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

24 lines
772 B
Plaintext
Raw Normal View History

2024-05-09 10:56:56 +08:00
<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>