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

30 lines
693 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}) %>
<% }) %>
<% 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">
<%
2019-10-24 04:03:12 +00:00
const prev_text = '&laquo; ' + __('prev')
const next_text = __('next') + ' &raquo;'
%>
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>
<% } %>