|
@@ -2,31 +2,23 @@
|
|
case 'archive':
|
|
case 'archive':
|
|
var last;
|
|
var last;
|
|
page.posts.each(function(post, i) {
|
|
page.posts.each(function(post, i) {
|
|
- var year = post.date.year();
|
|
|
|
- if (last != year) {
|
|
|
|
- if (last != null) { %>
|
|
|
|
- </div></section>
|
|
|
|
- <% }
|
|
|
|
- last = year; %>
|
|
|
|
- <div class="archive-year-wrap">
|
|
|
|
- <a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
|
|
|
|
- </div>
|
|
|
|
- <section class="archives-wrap">
|
|
|
|
- <div class="archives">
|
|
|
|
- <% } %>
|
|
|
|
- <%- partial('summary', {post: post, archive: true}) %>
|
|
|
|
- <% });
|
|
|
|
|
|
+ var year = post.date.year();
|
|
|
|
+ if (last != year) {
|
|
|
|
+ if (last != null) { %>
|
|
|
|
+ </div></section>
|
|
|
|
+ <% }
|
|
|
|
+ last = year; %>
|
|
|
|
+ <div class="archive-year-wrap">
|
|
|
|
+ <a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
|
|
|
|
+ </div>
|
|
|
|
+ <section class="archives-wrap">
|
|
|
|
+ <div class="archives">
|
|
|
|
+ <% } %>
|
|
|
|
+ <%- partial('summary', {post: post, archive: true}) %>
|
|
|
|
+ <% });
|
|
if (page.posts.length) { %>
|
|
if (page.posts.length) { %>
|
|
</div></section>
|
|
</div></section>
|
|
<% }
|
|
<% }
|
|
- if (page.total > 1) { %>
|
|
|
|
- <nav id="page-nav">
|
|
|
|
- <%- paginator({
|
|
|
|
- prev_text: '« ' + __('nav.prev'),
|
|
|
|
- next_text: __('nav.next') + ' »'
|
|
|
|
- }) %>
|
|
|
|
- </nav>
|
|
|
|
- <% }
|
|
|
|
break;
|
|
break;
|
|
case 'category': %>
|
|
case 'category': %>
|
|
<section class="archives-wrap">
|
|
<section class="archives-wrap">
|
|
@@ -38,14 +30,7 @@
|
|
<%- partial('summary', {post: post, archive: false}) %>
|
|
<%- partial('summary', {post: post, archive: false}) %>
|
|
<% }); %>
|
|
<% }); %>
|
|
</div></section>
|
|
</div></section>
|
|
- <% if (page.total > 1) { %>
|
|
|
|
- <nav id="page-nav">
|
|
|
|
- <%- paginator({
|
|
|
|
- prev_text: '« ' + __('nav.prev'),
|
|
|
|
- next_text: __('nav.next') + ' »'
|
|
|
|
- }) %>
|
|
|
|
- </nav>
|
|
|
|
- <% }
|
|
|
|
|
|
+ <%
|
|
break;
|
|
break;
|
|
case 'tag': %>
|
|
case 'tag': %>
|
|
<section class="archives-wrap">
|
|
<section class="archives-wrap">
|
|
@@ -57,26 +42,19 @@
|
|
<%- partial('summary', {post: post, archive: false}) %>
|
|
<%- partial('summary', {post: post, archive: false}) %>
|
|
<% }); %>
|
|
<% }); %>
|
|
</div></section>
|
|
</div></section>
|
|
- <% if (page.total > 1) { %>
|
|
|
|
- <nav id="page-nav">
|
|
|
|
- <%- paginator({
|
|
|
|
- prev_text: '« ' + __('nav.prev'),
|
|
|
|
- next_text: __('nav.next') + ' »'
|
|
|
|
- }) %>
|
|
|
|
- </nav>
|
|
|
|
- <% }
|
|
|
|
|
|
+ <%
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
page.posts.each(function(post) { %>
|
|
page.posts.each(function(post) { %>
|
|
- <%- partial('article', {post: post, index: true}) %>
|
|
|
|
|
|
+ <%- partial('article', { post: post, index: true }) %>
|
|
<% })
|
|
<% })
|
|
- if (page.total > 1) { %>
|
|
|
|
- <nav id="page-nav">
|
|
|
|
- <%- paginator({
|
|
|
|
- prev_text: '« ' + __('nav.prev'),
|
|
|
|
- next_text: __('nav.next') + ' »'
|
|
|
|
- }) %>
|
|
|
|
- </nav>
|
|
|
|
- <% }
|
|
|
|
break;
|
|
break;
|
|
-} %>
|
|
|
|
|
|
+}
|
|
|
|
+if (page.total > 1) { %>
|
|
|
|
+ <nav id="page-nav">
|
|
|
|
+ <%- paginator({
|
|
|
|
+ prev_text: '« ' + __('nav.prev'),
|
|
|
|
+ next_text: __('nav.next') + ' »'
|
|
|
|
+ }) %>
|
|
|
|
+ </nav>
|
|
|
|
+<% } %>
|