hexo-theme-keep/layout/common/article-post.ejs

42 lines
1.5 KiB
Plaintext

<!-- is_post() 检查当前页面是否为文章 -->
<% if (is_post()) { %>
<div class="article-container">
<div class="post-title">
<h3><a><%= page.title %></a></h3>
</div>
<div class="post-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="post-content">
<%- page.content %>
</div>
<!-- TODO: 上一篇,下一篇 -->
<!--<div class="post-prev-next">
<a class="prev btn" rel="prev" role="navigation" href="/">上一篇</a>
<a class="next btn" rel="next" role="navigation" href="/">下一篇</a>
</div>-->
<div class="comment-container">
<%- partial('valine') %>
</div>
</div>
<% } %>