blog/themes/chameleon/layout/_partial/archive.ejs

29 lines
687 B
Plaintext
Raw Normal View History

<% let last %>
<% page.posts.each((post, i) => { %>
<% const year = post.date.year() %>
<% if (last !== year) { %>
<% if (last !== null) { %>
</div></section>
2018-09-10 09:21:59 +00:00
<% } %>
<% last = year %>
<section class="archives-wrap">
<div class="archives">
2018-09-10 09:21:59 +00:00
<% } %>
<%- partial('archive-post', {post: post, even: i % 2 === 0}) %>
<% }) %>
<% if (page.posts.length) { %>
</div></section>
2018-09-10 09:21:59 +00:00
<% } %>
<% if (page.total > 1) { %>
2018-09-10 09:21:59 +00:00
<nav id="page-nav" class="page-nav">
<%
let prev_text = '&laquo; ' + __('prev')
let next_text = __('next') + ' &raquo;'
%>
2018-09-10 09:21:59 +00:00
<%- paginator({
prev_text: prev_text,
next_text: next_text
}) %>
</nav>
<% } %>