2019-06-08 08:01:39 +00:00
|
|
|
<% 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
|
|
|
<% } %>
|
2019-06-08 08:01:39 +00:00
|
|
|
<% last = year %>
|
|
|
|
<section class="archives-wrap">
|
|
|
|
<div class="archives">
|
2018-09-10 09:21:59 +00:00
|
|
|
<% } %>
|
2019-06-08 08:01:39 +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
|
|
|
<% } %>
|
2018-11-01 01:35:09 +00:00
|
|
|
<% if (page.total > 1) { %>
|
2018-09-10 09:21:59 +00:00
|
|
|
<nav id="page-nav" class="page-nav">
|
2018-11-01 01:35:09 +00:00
|
|
|
<%
|
2019-10-24 04:03:12 +00:00
|
|
|
const prev_text = '« ' + __('prev')
|
|
|
|
const next_text = __('next') + ' »'
|
2018-11-01 01:35:09 +00:00
|
|
|
%>
|
2018-09-10 09:21:59 +00:00
|
|
|
<%- paginator({
|
|
|
|
prev_text: prev_text,
|
2019-10-24 04:03:12 +00:00
|
|
|
next_text: next_text,
|
|
|
|
escape: false
|
2018-09-10 09:21:59 +00:00
|
|
|
}) %>
|
|
|
|
</nav>
|
|
|
|
<% } %>
|