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

19 lines
757 B
Plaintext

<% if (post.albums && post.albums.length){ %>
<div class="article-albums">
<ul class="article-albums-photos" id="basicExample">
<% post.albums.forEach(function(photo){ %>
<li class="article-albums-item" data-scroll-reveal>
<a class="article-albums-img fancybox" data-fancybox="images" data-caption="<%- photo[1] %>" href="<%- url_for(photo[0]) %>" rel="gallery_<%= post._id %>" title="<%- photo[1] %>">
<img class="lazy" data-original="<%- url_for(photo[0]) %>" itemprop="image" alt="<%- photo[1] %>">
</a>
<% if (photo && photo.length > 1){ %>
<span class="article-albums-caption"> <%- photo[1] %> </span>
<% } %>
</li>
<% }) %>
</ul>
</div>
<% } %>