26 lines
No EOL
669 B
Handlebars
26 lines
No EOL
669 B
Handlebars
<div class="row row--narrow grid">
|
|
{{#each trendingAssets}}
|
|
{{> gridItem}}
|
|
{{/each}}
|
|
</div>
|
|
|
|
<script src="/assets/vendors/masonry/masonry.pkgd.min.js"></script>
|
|
<script src="/assets/vendors/imagesloaded/imagesloaded.pkgd.min.js"></script>
|
|
<script>
|
|
// init masonry with element
|
|
var grid = document.querySelector('.grid');
|
|
var msnry;
|
|
|
|
imagesLoaded( grid, function() {
|
|
msnry = new Masonry( grid, {
|
|
itemSelector: '.grid-item',
|
|
columnWidth: 3,
|
|
percentPosition: true
|
|
});
|
|
});
|
|
|
|
// init with selector
|
|
// var msnry = new Masonry( '.grid', {
|
|
// // options...
|
|
// });
|
|
</script> |