53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
<!-- is_post() 检查当前页面是否为文章 -->
|
|
<% if (is_post()) { %>
|
|
<div class="article-container">
|
|
<div class="article-title">
|
|
<h3><a><%= page.title %></a></h3>
|
|
</div>
|
|
<div class="article-meta-info">
|
|
<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 => { %>
|
|
<a href="<%- url_for(category.path) %>" rel="category"><%= category.name %></a>
|
|
<% }) %>
|
|
</span>
|
|
<span>
|
|
<% page.tags.forEach(tag => { %>
|
|
<a href="<%- url_for(tag.path) %>" rel="tag">#<%= tag.name %></a>
|
|
<% }) %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="article-content">
|
|
<%- page.content %>
|
|
</div>
|
|
|
|
<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>
|
|
<div class="comment-container">
|
|
<%- partial('valine') %>
|
|
</div>
|
|
</div>
|
|
|
|
<% } %> |