mirror of
https://github.com/interstellar750/hexo_s
synced 2024-10-19 00:23:51 +08:00
16 lines
579 B
Plaintext
16 lines
579 B
Plaintext
<div class="post-wrap archive">
|
|
<% var last_year = ''; %>
|
|
<% page.posts.each(function (post) { %>
|
|
<% var cur_year = post.date.year(); %>
|
|
|
|
<% if(last_year !== cur_year){ %>
|
|
<h3><%- cur_year %></h3>
|
|
<% last_year = cur_year; } %>
|
|
|
|
<article class="archive-item">
|
|
<a class="archive-item-link" href="<%- url_for(post.path) %>"><%= post.title %></a>
|
|
<span class="archive-item-date"><%- date(post.date, theme.date_format) %></span>
|
|
</article>
|
|
<% }) %>
|
|
<%- partial('_partial/paginator') %>
|
|
</div> |