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

36 lines
1.3 KiB
Plaintext
Raw Normal View History

<!-- is_post() 检查当前页面是否为文章 -->
<% if (is_post()) { %>
<div class="post">
<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="tag"><%= 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>
<div class="comment-container">
<%- partial('valine') %>
</div>
2020-03-15 15:45:38 +08:00
</div>
<% } %>