2020-03-14 16:17:04 +08:00
|
|
|
<div class="article-post">
|
|
|
|
<!-- 检查当前页面是否为存档页面 -->
|
|
|
|
<% if (!is_archive()) { %>
|
|
|
|
<ul class="article-post-list">
|
|
|
|
<% page.posts.forEach(post => { %>
|
|
|
|
<li class="article-post-item">
|
|
|
|
<div class="article-post-title">
|
|
|
|
<h3>
|
|
|
|
<a href="<%- url_for(post.path) %>"><%= post.title %></a>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="article-post-content">
|
2020-03-15 16:55:09 +08:00
|
|
|
<p><%- post.content %></p>
|
2020-03-14 16:17:04 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="article-post-meta">
|
|
|
|
|
|
|
|
<span class="article-date">
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
<%= date(post.date, 'YYYY-MM-DD HH:MM:SS') %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="article-tags">
|
|
|
|
<i class="fa fa-tags"></i>
|
|
|
|
<ul>
|
|
|
|
<% post.tags.forEach(tag => { %>
|
|
|
|
<li>
|
|
|
|
<a href="<%- url_for(tag.path) %>" rel="tag"><%= tag.name %></a>
|
|
|
|
</li>
|
|
|
|
<% }); %>
|
|
|
|
</ul>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="article-categories">
|
|
|
|
<i class="fa fa-table"></i>
|
|
|
|
<ul>
|
|
|
|
<% post.categories.forEach(category => { %>
|
|
|
|
<li>
|
|
|
|
<a href="<%- url_for(category.path) %>" rel="tag"><%= category.name %></a>
|
|
|
|
</li>
|
|
|
|
<% }); %>
|
|
|
|
</ul>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
|
|
|
<% } %>
|
|
|
|
|
2020-03-15 15:45:38 +08:00
|
|
|
<!-- 分页器 -->
|
|
|
|
<div class="paginator">
|
|
|
|
|
|
|
|
<!--<ul class="paginator-btn-box">
|
|
|
|
<li class="paginator-btn prev-page">
|
|
|
|
<a class="btn" role="navigation" href=""><%- __('prev') %></a>
|
|
|
|
</li>
|
|
|
|
<li class="paginator-btn next-page">
|
|
|
|
<a class="btn" role="navigation" href=""><%- __('next') %></a>
|
|
|
|
</li>
|
|
|
|
</ul>-->
|
|
|
|
|
|
|
|
<%- paginator({
|
|
|
|
prev_text: __('prev'),
|
|
|
|
next_text: __('next'),
|
|
|
|
escape: false
|
|
|
|
}) %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-03-14 16:17:04 +08:00
|
|
|
</div>
|