Skip to content

Instantly share code, notes, and snippets.

@Sillson
Last active April 23, 2016 15:24
Show Gist options
  • Save Sillson/1e5e7d9cbb6d57e37099 to your computer and use it in GitHub Desktop.
Save Sillson/1e5e7d9cbb6d57e37099 to your computer and use it in GitHub Desktop.
Gettin down with down-arrows
</style><script>function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
console.log(referenceNode.parentNode);
}
var div = document.getElementsByClassName("row-grid");
var locationName = "[ENTER LOCATION NAME]";
var locationCity = "[ENTER LOCATION CITY]";
var locationState = "[ENTER LOCATION STATE]";
var uPhotoSrc = ["ENTER PHOTO SOURCE"];
var uPhotoAlt = "Custom graphic for "+locationName+" in "+locationCity+", "+locationState;
for (var i=0; i < div.length; i++){
console.log(div[i]);
var el = document.createElement("figure");
el.className = el.className + "photo photo-left down-arrow widget h-media";
el.itemType = "http://schema.org/Photograph"
el.innerHTML = "<img class='u-photo' src='"+uPhotoSrc+"' alt='"+uPhotoAlt+"' itemprop='image'>";
insertAfter(div[i], el);
}</script>
<style>
@Sillson
Copy link
Author

Sillson commented Jul 23, 2015

Also, add this to your CSS override widget in the "Adie Before Main" section. Fixes nav overlay issue.

.row .down-arrow {z-index:0;}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment