mirror of https://gitlab.com/curben/blog
35 lines
886 B
Plaintext
35 lines
886 B
Plaintext
<% if (pagination === 2) { %>
|
|
<% page.posts.each(function(post) { %>
|
|
<%- partial('article', {post: post, index: true}) %>
|
|
<% }) %>
|
|
<% } else { %>
|
|
<% let last %>
|
|
<% page.posts.each(function(post, i) { %>
|
|
<% const year = post.date.year() %>
|
|
<% if (last !== year) { %>
|
|
<% if (last !== null) { %>
|
|
</div></section>
|
|
<% } %>
|
|
<% last = year %>
|
|
<section class="archives-wrap">
|
|
<div class="archives">
|
|
<% } %>
|
|
<%- partial('archive-post', {post: post, even: i % 2 === 0}) %>
|
|
<% }) %>
|
|
<% if (page.posts.length) { %>
|
|
</div></section>
|
|
<% } %>
|
|
<% } %>
|
|
<% if (page.total > 1) { %>
|
|
<nav id="page-nav" class="page-nav">
|
|
<%
|
|
let prev_text = "« " + __('prev')
|
|
let next_text = __('next') + " »"
|
|
%>
|
|
<%- paginator({
|
|
prev_text: prev_text,
|
|
next_text: next_text
|
|
}) %>
|
|
</nav>
|
|
<% } %>
|