You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
4.6 KiB

6 years ago
<article id="<%= post.layout %>-<%= post.slug %>" class="post white-box article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<section class='meta'>
6 years ago
<h1 class="title">
<% if(post.title){ %>
<%= post.title %>
<% } else if (post.date) { %>
<%= date(post.date, 'YYYY-MM-DD dddd') %>
<% } %>
</h1>
6 years ago
<time>
<%= date(post.date, 'YYYY-MM-DD dddd') %>&nbsp;&nbsp;
<i class="fa fa-eye" aria-hidden="true"></i>&nbsp;<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>
6 years ago
<% if(post.toc!==false && toc(post.content).length > 0){ %>
<section class="toc-wrapper">
<div class="header"><i class="fa fa-list" aria-hidden="true"></i>&nbsp;&nbsp;目录</div>
<div class='content'>
<%- toc(post.content, {list_number: true}) %>
</div>
</section>
7 years ago
<% } %>
6 years ago
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
<%- post.content %>
</div>
6 years ago
6 years ago
<% if (post.tags && post.tags.length) { %>
<div class="article-tags tags">
<% post.tags.each(function(item){ %>
<a href="<%- url_for(item.path) %>"><i class="fa fa-tag"></i>&nbsp;&nbsp;<%=item.name %></a>
<%})%>
</div>
<% } %>
7 years ago
6 years ago
<% if(post.prev || post.next){ %>
<div class="art-item-footer">
<% if(post.prev){ %>
<span class="art-item-left">
<i class="fa fa-chevron-left" aria-hidden="true"></i>&nbsp;
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
<%= post.prev.title %>
</a>
</span>
<% } %>
<% if(post.next){ %>
<span class="art-item-right">
<a href="<%=url_for(post.next.path) %>" rel="next" title="<%=post.next.title %>">
<%=post.next.title %>
</a>&nbsp;
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</span>
<%} %>
</div>
<%} %>
7 years ago
6 years ago
</section>
7 years ago
6 years ago
</article>
7 years ago
6 years ago
<br>
6 years ago
<!-- 显示推荐文章和评论 -->
<% if (post && ((config.recommended_posts && config.recommended_posts.autoDisplay == false && post.recommended_posts != false) || (post.comments && (config.disqus_shortname || config.livere_shortname || config.valine)) )) { %>
6 years ago
<article class="post white-box article-type-<%= post.layout %>>">
<section class="article typo">
6 years ago
<% if (config.recommended_posts && config.recommended_posts.autoDisplay == false && post.recommended_posts != false) { %>
6 years ago
<%- partial('post/recommended_posts', {page: post, site: site}) %>
<% } %>
6 years ago
6 years ago
<% if (post.comments) { %>
<% if (config.livere_shortname || config.valine){ %>
<h4><i class="fa fa-comments" aria-hidden="true"></i>&nbsp;&nbsp;评论</h4>
6 years ago
<% } %>
<% if (config.livere_shortname){ %>
<section id="comments">
<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTU4Ny82MTU1">
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
</div>
</section>
<% } %>
<% if (config.disqus_shortname) { %>
6 years ago
<section id="comments">
6 years ago
<div id="disqus_thread">
无法加载评论系统,请确保您的网络能够正常访问 <a href="https://disqus.com">Disqus</a> 。
</div>
6 years ago
</section>
<% } %>
6 years ago
<% if (config.valine){ %>
<% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %>
<section id="comments">
<div id="valine_container" class="valine_thread">
</i><i class="fa fa-spinner fa-spin fa-fw"></i>
</div>
</section>
<% } %>
<% } %>
<% } %>
6 years ago
6 years ago
</section>
</article>
<% } %>
6 years ago
7 years ago
<script>
6 years ago
window.subData = {
title: '<%= post.title %>',
tools: true
}
7 years ago
</script>