2017-10-13 18:29:29 +02:00
|
|
|
<div class="row grid">
|
2017-09-29 23:11:00 +02:00
|
|
|
{{#each trendingAssets}}
|
2017-10-13 18:29:29 +02:00
|
|
|
{{> gridItem}}
|
2017-09-29 23:11:00 +02:00
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
|
2017-10-13 18:29:29 +02:00
|
|
|
<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>
|