hexo-theme-ayer/layout/_partial/post/justifiedGallery.ejs
2019-12-03 19:37:44 +08:00

13 lines
460 B
Plaintext

<% if (post.albums && post.albums.length){ %>
<div class="justified-gallery" id="gallery">
<% post.albums.forEach(function(photo){ %>
<div>
<a class="fancybox" data-fancybox="images" data-caption="<%- photo[1] %>" href="<%- url_for(photo[0]) %>" rel="gallery_<%= post._id %>" title="<%- photo[1] %>">
<img src="<%- url_for(photo[0]) %>" itemprop="image" alt="<%- photo[1] %>">
</a>
</div>
<% }) %>
</div>
<% } %>