blog/themes/fluid/layout/_partials/archive-list.ejs
2024-11-16 11:34:10 +08:00

18 lines
601 B
Plaintext

<div class="list-group">
<p class="h4"><%= __(params.key + '.post_total', params.postTotal) %></p>
<hr>
<% var dateCursor %>
<% page.posts.each(function (post) { %>
<% if(date(post.date, "YYYY") !== dateCursor) { %>
<% dateCursor = date(post.date, "YYYY") %>
<p class="h5"><%= dateCursor %></p>
<% } %>
<a href="<%= url_for(post.path) %>" class="list-group-item list-group-item-action">
<time><%= date(post.date, "MM-DD") %></time>
<div class="list-group-item-title"><%= post.title %></div>
</a>
<% }) %>
</div>
<%- partial('_partials/paginator') %>