hexo-theme-amane/layout/common/timeline.ejs

39 lines
1.3 KiB
Plaintext

<%
switch (type) {
case 'category':
title = page.category;
icon = 'folder';
break;
case 'tag':
title = '#' + page.tag;
icon = 'tag';
break;
}
%>
<div class="timeline timeline-wrap">
<div class="timeline-row timeline-row-major">
<span class="node"><i class="fa fa-<%= icon %>"></i></span>
<h1 class="title"><%= title %></h1>
</div>
<% page.posts.each(function (post, i) { %>
<div class="timeline-row">
<span class="node"></span>
<div class="content">
<%- partial('post/title', { post: post, index: true, class_name: 'timeline-article-title' }) %>
<div class="article-meta">
<%- partial('post/date', { post: post, class_name: 'article-date', date_format: null }) %>
<%- partial('post/category', { post: post }) %>
<%- partial('post/tag', { post: post }) %>
</div>
</div>
</div>
<% }); %>
</div>
<% if (page.total > 1) { %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% } %>