hexo/themes/blank/layout/partial/archive.ejs

24 lines
772 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){ %>
<div class="yearzodiac">
<div class="years">
<h1><%- cur_year %> <i class="<%- getAnimalIcon(cur_year) %>"></i></h1>
</div>
</div>
<% last_year = cur_year; } %>
<li 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>
</li>
<% }) %>
<div class="arc_pag">
<%- partial('partial/paginator') %>
</div>
</div>