2020-03-18 23:14:09 +08:00
|
|
|
<!-- is_post() 检查当前页面是否为文章 -->
|
|
|
|
<% if (is_post()) { %>
|
2020-03-19 18:11:13 +08:00
|
|
|
<div class="article-container">
|
2020-03-19 22:12:09 +08:00
|
|
|
<div class="article-title">
|
2020-03-18 23:14:09 +08:00
|
|
|
<h3><a><%= page.title %></a></h3>
|
|
|
|
</div>
|
2020-03-19 22:12:09 +08:00
|
|
|
<div class="article-meta-info">
|
2020-03-18 23:14:09 +08:00
|
|
|
<div class="meta">
|
|
|
|
<div class="info">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
<span class="date"><%- date(page.date, 'YYYY-MM-DD') %></span>
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-list"></i>
|
|
|
|
<% page.categories.forEach(category => { %>
|
2020-03-19 18:11:13 +08:00
|
|
|
<a href="<%- url_for(category.path) %>" rel="category"><%= category.name %></a>
|
2020-03-18 23:14:09 +08:00
|
|
|
<% }) %>
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<% page.tags.forEach(tag => { %>
|
|
|
|
<a href="<%- url_for(tag.path) %>" rel="tag">#<%= tag.name %></a>
|
|
|
|
<% }) %>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-19 22:12:09 +08:00
|
|
|
<div class="article-content">
|
2020-03-19 14:51:48 +08:00
|
|
|
<%- page.content %>
|
|
|
|
</div>
|
2020-03-19 18:11:13 +08:00
|
|
|
|
2020-03-19 22:12:09 +08:00
|
|
|
<div class="article-nav">
|
|
|
|
<% if (page.prev) { %>
|
|
|
|
<div class="article-prev">
|
|
|
|
<a class="prev btn" rel="prev" role="navigation"
|
|
|
|
href="<%= url_for(page.prev.path) %>"><i class="fa fa-chevron-left"></i> <%= page.prev.title %>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
<% if (page.next) { %>
|
|
|
|
<div class="article-next">
|
|
|
|
<a class="next btn" rel="next" role="navigation"
|
|
|
|
href="<%= url_for(page.next.path) %>"><%= page.next.title %> <i class="fa fa-chevron-right"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
2020-03-18 23:14:09 +08:00
|
|
|
<div class="comment-container">
|
|
|
|
<%- partial('valine') %>
|
|
|
|
</div>
|
2020-03-15 15:45:38 +08:00
|
|
|
</div>
|
|
|
|
|
2020-03-18 23:14:09 +08:00
|
|
|
<% } %>
|