yufan.me/themes/spectre/layout/category.ejs
2024-06-14 02:15:18 +08:00

43 lines
1.5 KiB
Plaintext

<% if( is_category()){ %>
<div class="container container-timeline">
<div class="timeline">
<div class="timeline-item">
<div class="timeline-left">
<div class="timeline-icon icon-lg"></div>
</div>
<div class="timeline-content">
<div class="tile">
<div class="tile-content">
<span class="tile-subtitle text-gray mb-2">分类</span>&nbsp;&nbsp;<span class="tile-title"><span class="h4"><%= page.category %></span></span>
</div>
</div>
</div>
</div>
<% page.posts.sort('date', -1).each(function(post){ %>
<div class="timeline-item">
<div class="timeline-left">
<a class="timeline-icon" href="<%- url_for(post.path) %>"></a>
</div>
<div class="timeline-content">
<div class="tile">
<div class="tile-content">
<p class="tile-subtitle text-gray mb-1"><%= date(post.date, config.date_format) %></p>
<a href="<%- url_for(post.path) %>" style="color: #667189;"><p class="tile-title"><%= post.title %></p></a>
</div>
</div>
</div>
</div>
<% }) %>
</div>
</div>
<div class="container container-index-nav">
<%- partial('_partial/index-nav') %>
</div>
<% } else { %>
<% } %>