|
|
@ -1,6 +1,4 @@ |
|
|
|
<article id="<%= post.layout %>-<%= post.slug %>" |
|
|
|
<article id="<%= post.layout %>-<%= post.slug %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost"> |
|
|
|
class="post white-box article-type-<%= post.layout %>" |
|
|
|
|
|
|
|
itemscope itemprop="blogPost"> |
|
|
|
|
|
|
|
<section class='meta'> |
|
|
|
<section class='meta'> |
|
|
|
<h2 class="title"> |
|
|
|
<h2 class="title"> |
|
|
|
<a href="<%- url_for(post.path) %>"> |
|
|
|
<a href="<%- url_for(post.path) %>"> |
|
|
@ -12,8 +10,8 @@ |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</h2> |
|
|
|
</h2> |
|
|
|
<time> |
|
|
|
<time> |
|
|
|
<%= date(post.date, 'YYYY-MM-DD dddd') %> |
|
|
|
<%= date(post.date, 'YYYY-MM-DD dddd') %> |
|
|
|
,阅读量 <span id="busuanzi_value_page_pv"><i class="fa spinner fa-spin"></i></span> 次 |
|
|
|
<i class="fa fa-eye" 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> |
|
|
|
</time> |
|
|
|
<%- partial('categories',{post:post}) %> |
|
|
|
<%- partial('categories',{post:post}) %> |
|
|
|
</section> |
|
|
|
</section> |
|
|
@ -30,51 +28,54 @@ |
|
|
|
<% if (post.tags && post.tags.length) { %> |
|
|
|
<% if (post.tags && post.tags.length) { %> |
|
|
|
<div class="article-tags tags"> |
|
|
|
<div class="article-tags tags"> |
|
|
|
<% post.tags.each(function(item){ %> |
|
|
|
<% post.tags.each(function(item){ %> |
|
|
|
<a href="<%- url_for(item.path) %>"><i class="fa fa-tag"></i> <%=item.name %></a> |
|
|
|
<a href="<%- url_for(item.path) %>"><i class="fa fa-tag"></i> <%=item.name %></a> |
|
|
|
<%})%> |
|
|
|
<%})%> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if(post.prev || post.next){ %> |
|
|
|
<% if(post.prev || post.next){ %> |
|
|
|
<div class="art-item-footer"> |
|
|
|
<div class="art-item-footer"> |
|
|
|
<% if(post.prev){ %> |
|
|
|
<% if(post.prev){ %> |
|
|
|
<span class="art-item-left"><i class="icon icon-chevron-thin-left"></i>prev:<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>"> |
|
|
|
<span class="art-item-left"> |
|
|
|
|
|
|
|
<i class="fa fa-chevron-left" aria-hidden="true"></i> |
|
|
|
|
|
|
|
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>"> |
|
|
|
<%= post.prev.title %> |
|
|
|
<%= post.prev.title %> |
|
|
|
</a></span> |
|
|
|
</a> |
|
|
|
|
|
|
|
</span> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% if(post.next){ %> |
|
|
|
<% if(post.next){ %> |
|
|
|
<span class="art-item-right">next:<a href="<%=url_for(post.next.path) %>" rel="next" title="<%=post.next.title %>"> |
|
|
|
<span class="art-item-right"> |
|
|
|
|
|
|
|
<a href="<%=url_for(post.next.path) %>" rel="next" title="<%=post.next.title %>"> |
|
|
|
<%=post.next.title %> |
|
|
|
<%=post.next.title %> |
|
|
|
</a><i class="icon icon-chevron-thin-right"></i></span> |
|
|
|
</a> |
|
|
|
|
|
|
|
<i class="fa fa-chevron-right" aria-hidden="true"></i> |
|
|
|
|
|
|
|
</span> |
|
|
|
<%} %> |
|
|
|
<%} %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<%} %> |
|
|
|
<%} %> |
|
|
|
|
|
|
|
|
|
|
|
</section> |
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article> |
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
|
|
<br> |
|
|
|
<br> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 显示推荐文章和评论 --> |
|
|
|
|
|
|
|
<% if (post && ((theme.recommended_posts.enabled && post.recommended_posts != false) || post.comments )) { %> |
|
|
|
<article class="post white-box article-type-<%= post.layout %>>"> |
|
|
|
<article class="post white-box article-type-<%= post.layout %>>"> |
|
|
|
<section class="article typo"> |
|
|
|
<section class="article typo"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if (post && theme.recommended_posts.enabled && post.recommended_posts != false) { %> |
|
|
|
|
|
|
|
<%- partial('post/recommended_posts', {page: post, site: site}) %> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
|
|
|
|
|
|
|
|
<% if (post.comments) { %> |
|
|
|
<% if (post.comments) { %> |
|
|
|
|
|
|
|
<% if (config.livere_shortname || config.valine){ %> |
|
|
|
|
|
|
|
<h4>评论</h4> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
<% if (config.livere_shortname){ %> |
|
|
|
<% if (config.livere_shortname){ %> |
|
|
|
<section id="comments"> |
|
|
|
<section id="comments"> |
|
|
|
<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTU4Ny82MTU1"> |
|
|
|
<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTU4Ny82MTU1"> |
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
(function(d, s) { |
|
|
|
|
|
|
|
var j, e = d.getElementsByTagName(s)[0]; |
|
|
|
|
|
|
|
if (typeof LivereTower === 'function') { return; } |
|
|
|
|
|
|
|
j = d.createElement(s); |
|
|
|
|
|
|
|
j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; |
|
|
|
|
|
|
|
j.async = true; |
|
|
|
|
|
|
|
e.parentNode.insertBefore(j, e); |
|
|
|
|
|
|
|
})(document, 'script'); |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript> |
|
|
|
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</section> |
|
|
@ -87,43 +88,21 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
|
|
|
|
|
|
|
|
<% if (config.valine){ %> |
|
|
|
<% if (config.valine){ %> |
|
|
|
<% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %> |
|
|
|
<% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %> |
|
|
|
<section id="comments"> |
|
|
|
<section id="comments"> |
|
|
|
<div id="valine_container" class="valine_thread"></div> |
|
|
|
<div id="valine_container" class="valine_thread"> |
|
|
|
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> |
|
|
|
</i><i class="fa fa-spinner fa-spin fa-fw"></i> |
|
|
|
<script src="//unpkg.com/valine/dist/Valine.min.js"></script> |
|
|
|
</div> |
|
|
|
<script> |
|
|
|
|
|
|
|
var GUEST_INFO = ['nick','mail','link']; |
|
|
|
|
|
|
|
var guest_info = '<%= config.valine.guest_info %>'.split(',').filter(function(item){ |
|
|
|
|
|
|
|
return GUEST_INFO.indexOf(item) > -1 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var notify = '<%= config.valine.notify %>' == true; |
|
|
|
|
|
|
|
var verify = '<%= config.valine.verify %>' == true; |
|
|
|
|
|
|
|
var valine = new Valine(); |
|
|
|
|
|
|
|
valine.init({ |
|
|
|
|
|
|
|
el: '#valine_container', |
|
|
|
|
|
|
|
notify: notify, |
|
|
|
|
|
|
|
verify: verify, |
|
|
|
|
|
|
|
guest_info: guest_info, |
|
|
|
|
|
|
|
appId: "<%= config.valine.appId %>", |
|
|
|
|
|
|
|
appKey: "<%= config.valine.appKey %>", |
|
|
|
|
|
|
|
placeholder: "<%= config.valine.placeholder %>", |
|
|
|
|
|
|
|
pageSize:'<%= config.valine.pageSize %>', |
|
|
|
|
|
|
|
avatar:'<%= config.valine.avatar %>', |
|
|
|
|
|
|
|
lang:'<%= config.valine.lang %>' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
<% if (post && theme.recommended_posts.enabled) { %> |
|
|
|
|
|
|
|
<%- partial('post/recommended_posts', {page: post, site: site}) %> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section> |
|
|
|
</section> |
|
|
|
</article> |
|
|
|
</article> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
window.subData = { |
|
|
|
window.subData = { |
|
|
@ -131,4 +110,3 @@ |
|
|
|
tools: true |
|
|
|
tools: true |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<!-- recommended posts --> |
|
|
|
|
|
|
|