blob: cdda897ac4d3fa3b036d25bb3f23ebb85d57fa96 [file] [log] [blame]
Tang Cheng60ba8032016-06-20 15:31:17 +08001<% if (pagination == 2){ %>
2 <% page.posts.each(function(post){ %>
3 <%- partial('article', {post: post, index: true}) %>
4 <% }) %>
5<% } else { %>
6 <% var last; %>
7 <% page.posts.each(function(post, i){ %>
8 <% var year = post.date.year(); %>
9 <% if (last != year){ %>
10 <% if (last != null){ %>
11 </div></section>
12 <% } %>
13 <% last = year; %>
14 <section class="archives-wrap">
15 <div class="archive-year-wrap">
16 <a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
17 </div>
18 <div class="archives">
19 <% } %>
20 <%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
21 <% }) %>
22 <% if (page.posts.length){ %>
23 </div></section>
24 <% } %>
25<% } %>
26<% if (page.total > 1){ %>
27 <div id="page-nav">
28 <%- bs_paginator({
29 prev_text: '<i class="fa fa-chevron-left"></i> Prev',
30 next_text: 'Next <i class="fa fa-chevron-right"></i>'
31 }) %>
32 </div>
33<% } %>