|
|
|
|
<article id="<%= post.layout %>-<%= post.slug %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost">
|
|
|
|
|
<section class='meta'>
|
|
|
|
|
<h1 class="title">
|
|
|
|
|
<% if(post.title){ %>
|
|
|
|
|
<%= post.title %>
|
|
|
|
|
<% } else if (post.date) { %>
|
|
|
|
|
<%= date(post.date, config.date_format) %>
|
|
|
|
|
<% } %>
|
|
|
|
|
</h1>
|
|
|
|
|
<time>
|
|
|
|
|
<%= date(post.date, config.date_format) %>
|
|
|
|
|
<i class="fa fa-eye fa-fw" aria-hidden="true"></i> <span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span>
|
|
|
|
|
</time>
|
|
|
|
|
<%- partial('categories',{post:post}) %>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="article typo">
|
|
|
|
|
|
|
|
|
|
<div class="article-entry" itemprop="articleBody">
|
|
|
|
|
<%- post.content %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% if (post.tags && post.tags && post.tags.each) { %>
|
|
|
|
|
<div class="article-tags tags">
|
|
|
|
|
<% post.tags.each(function(item){ %>
|
|
|
|
|
<a href="<%- url_for(item.path) %>"><i class="fa fa-tag fa-fw" aria-hidden="true"></i> <%=item.name %></a>
|
|
|
|
|
<%})%>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if(post.prev || post.next){ %>
|
|
|
|
|
<div class="prev-next">
|
|
|
|
|
<% if(post.prev){ %>
|
|
|
|
|
<section class="prev" >
|
|
|
|
|
<span class="art-item-left">
|
|
|
|
|
<h6><i class="fa fa-chevron-left" aria-hidden="true"></i> 上一篇</h6>
|
|
|
|
|
<h4>
|
|
|
|
|
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
|
|
|
|
|
<% if(post.prev.title){ %>
|
|
|
|
|
<%= post.prev.title %>
|
|
|
|
|
<% } else if (post.prev.date) { %>
|
|
|
|
|
<%= date(post.prev.date, config.date_format) %>
|
|
|
|
|
<% } %>
|
|
|
|
|
</a>
|
|
|
|
|
</h4>
|
|
|
|
|
<% if (post.prev.tags && post.prev.tags.length) { %>
|
|
|
|
|
<h6 class="tags">
|
|
|
|
|
<% post.prev.tags.each(function(item){ %>
|
|
|
|
|
<i class="fa fa-tag fa-fw"></i><%=item.name %>
|
|
|
|
|
<%})%>
|
|
|
|
|
</h6>
|
|
|
|
|
<% } %>
|
|
|
|
|
</span>
|
|
|
|
|
</section>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% if(post.next){ %>
|
|
|
|
|
<section class="next">
|
|
|
|
|
<span class="art-item-right" aria-hidden="true">
|
|
|
|
|
<h6>下一篇 <i class="fa fa-chevron-right" aria-hidden="true"></i></h6>
|
|
|
|
|
<h4>
|
|
|
|
|
<a href="<%=url_for(post.next.path)%>" rel="prev" title="<%=post.next.title%>">
|
|
|
|
|
<% if(post.next.title){ %>
|
|
|
|
|
<%= post.next.title %>
|
|
|
|
|
<% } else if (post.next.date) { %>
|
|
|
|
|
<%= date(post.next.date, config.date_format) %>
|
|
|
|
|
<% } %>
|
|
|
|
|
</a>
|
|
|
|
|
</h4>
|
|
|
|
|
<% if (post.next.tags && post.next.tags.length) { %>
|
|
|
|
|
<h6 class="tags">
|
|
|
|
|
<% post.next.tags.each(function(item){ %>
|
|
|
|
|
<i class="fa fa-tag fa-fw"></i><%=item.name %>
|
|
|
|
|
<%})%>
|
|
|
|
|
</h6>
|
|
|
|
|
<% } %>
|
|
|
|
|
</span>
|
|
|
|
|
</section>
|
|
|
|
|
<%} %>
|
|
|
|
|
</div>
|
|
|
|
|
<%} %>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<!-- 显示推荐文章和评论 -->
|
|
|
|
|
<% if (post && ((config.recommended_posts && config.recommended_posts.autoDisplay == false && post.recommended_posts != false) || (post.comments && (config.disqus_shortname || config.livere_shortname || config.valine)) )) { %>
|
|
|
|
|
<article class="post white-box comments">
|
|
|
|
|
<section class="article typo">
|
|
|
|
|
|
|
|
|
|
<% if (config.recommended_posts && config.recommended_posts.autoDisplay == false && post.recommended_posts != false) { %>
|
|
|
|
|
<%- partial('post/recommended_posts', {page: post, site: site}) %>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if (post.comments) { %>
|
|
|
|
|
|
|
|
|
|
<% if (config.disqus_shortname) { %>
|
|
|
|
|
<h4><i class="fa fa-comments fa-fw" aria-hidden="true"></i> Disqus评论</h4>
|
|
|
|
|
<section id="comments">
|
|
|
|
|
<div id="disqus_thread">
|
|
|
|
|
⚠️ 无法加载评论系统,请确保您的网络能够正常访问 <a href="https://disqus.com">Disqus</a> 。
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if (config.livere_shortname){ %>
|
|
|
|
|
<h4><i class="fa fa-comments fa-fw" aria-hidden="true"></i> LiveRe评论</h4>
|
|
|
|
|
<section id="comments">
|
|
|
|
|
<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTU4Ny82MTU1">
|
|
|
|
|
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if (config.valine){ %>
|
|
|
|
|
<% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %>
|
|
|
|
|
<h4><i class="fa fa-comments fa-fw" aria-hidden="true"></i> Valine评论</h4>
|
|
|
|
|
<section id="comments">
|
|
|
|
|
<div id="valine_container" class="valine_thread">
|
|
|
|
|
</i><i class="fa fa-spinner fa-spin fa-fw"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
</article>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
window.subData = {
|
|
|
|
|
title: '<%= post.title %>',
|
|
|
|
|
tools: true
|
|
|
|
|
}
|
|
|
|
|
</script>
|