% switch (type) {
case 'archive':
var last;
page.posts.each(function(post, i) {
var year = post.date.year();
if (last != year) {
if (last != null) { %>
<% }
last = year; %>
<% } %>
<%- partial('summary', {post: post, archive: true}) %>
<% });
if (page.posts.length) { %>
<% }
break;
case 'category': %>
<%= page.category %>
<% page.posts.each(function (post, i) { %>
<%- partial('summary', {post: post, archive: false}) %>
<% }); %>
<%
break;
case 'tag': %>
#<%= page.tag %>
<% page.posts.each(function (post, i) { %>
<%- partial('summary', {post: post, archive: false}) %>
<% }); %>
<%
break;
default:
page.posts.each(function(post) { %>
<%- partial('article', { post: post, index: true }) %>
<% })
break;
}
if (page.total > 1) { %>
<%- paginator({
prev_text: '« ' + __('nav.prev'),
next_text: __('nav.next') + ' »'
}) %>
<% } %>