You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

7 years ago
<% if (page.year || page.month) { %>
<%- partial('_partial/archive') %>
<% } else { %>
<article id="archive-page" class="post article white-box">
<section class="archive">
<%
var year = -1, postid = -1;
site.posts.sort('date', -1).each(function(post) {
post.year = date(post.date, 'YYYY');
if (post.year && post.year !== year) {
year = post.year;
%>
6 years ago
<div class="archive-item archive-year mark">
<h2>
<%= year %>
</h2>
<hr>
</div>
7 years ago
<% } %>
6 years ago
<div class="archive-item archive-post mark">
<a href="<%= url_for(post.path) %>">
<time><%= date(post.date, 'MM-DD') %></time>
<span class="title"><span><%= post.title %></span></span>
</a>
7 years ago
</div>
<% }); %>
</section>
</article>
<!--
<% if (page.total > 1) { %>
<nav id="page-nav">
<% if (page.prev != 0) { %>
<a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>">
<span class="icon icon-chevron-left"></span>
<span class="text">Previous</span>
</a>
<% } %>
<% if (page.next != 0) { %>
<a class="next" rel="next" href="<%= url_for(page.next_link) %>">
<span class="text">Next</span>
<span class="icon icon-chevron-right"></span>
</a>
<% } %>
</nav>
<% } %>
-->
<% } %>