Created
January 12, 2018 09:36
-
-
Save bakura10/c2e815dbfc3c8548d7816a1fad670ea8 to your computer and use it in GitHub Desktop.
Update to fix the Instagram Section for Focal—premium Shopify theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.addEventListener("DOMContentLoaded",function(){var a=function(a){var e=new Date(1e3*a.created_time),t=e.getMonth(),n=e.getDate(),i=e.getFullYear(),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return a.created_time=r[t]+" "+n+", "+i,!0},e=function(e){var t={% raw %}'<div class="instagram-fix grid__cell 1/2 1/3--handheld-and-up 1/'+e.attr("data-images-per-row")+'--lap-and-up"><div class="instagram__image-wrapper" style="background-image: url({{image}})"><a href="{{link}}" target="_blank"><div class="instagram__overlay"><p class="instagram__caption">{{caption}}</p><time class="instagram__date">{{model.created_time}}</time></div></a></div></div>'{% endraw %};new Instafeed({get:"user",userId:"self",accessToken:e.attr("data-access-token"),sortBy:"most-recent",limit:e.attr("data-limit-images"),resolution:"standard_resolution",template:t,filter:$.proxy(a)}).run()};$(".index-module__instagram[data-access-token]").each(function(a,t){e($(t))})}); | |
</script> | |
<style> | |
.instagram__image-wrapper { | |
background-size: cover; | |
background-position: center; | |
} | |
.instagram__image-wrapper > a { | |
display: block; | |
padding-bottom: 100%; | |
} | |
.instagram__image--placeholder { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
.instafeed .grid__cell:not(.instagram-fix) { | |
display: none !important; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For installation instructions, please refer to the documentation: http://support.maestrooo.com/article/155-update-to-fix-the-instagram-section-for-focal.