hexo-theme-amane/layout/common/thumbnail.ejs

9 lines
373 B
Plaintext

<a href="<%- url_for((post.link ? post.link : post.path)) %>" class="thumbnail">
<% var thumbnailUrl = thumbnail(post) %>
<% if (thumbnailUrl) { %>
<span style="background-image:url(<%= thumbnailUrl %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
<% } else { %>
<span class="thumbnail-image thumbnail-none"></span>
<% } %>
</a>