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.

183 lines
8.4 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
<% if(post.music){ %>
<div class="aplayer" data-mini=true
data-mode="circulation" data-volume="0.5"
data-server="<%= post.music.server %>"
data-type="<%= post.music.type %>"
data-id="<%= post.music.id %>">
</div>
<% } %>
<div class="meta" id="header-meta">
6 years ago
<% if(post.title){ %>
<h1 class="title"><%= post.title %></h1>
<% } else if (post.date) { %>
<h1 class="title"><%= date(post.date, config.date_format) %></h1>
<% } %>
6 years ago
<time class="time">
<i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>
<%= date(post.date, config.date_format) %>
6 years ago
</time>
6 years ago
<% if (config.leancloud && config.leancloud.app_id && config.leancloud.app_key) { %>
<div class="browse leancloud"><i class="fas fa-eye fa-fw" aria-hidden="true"></i>
6 years ago
<span id="<%= url_for(post.path) %>" class="leancloud_visitors" data-flag-title="<%= post.title %>">
<span class="leancloud-visitors-count"></span>
</span>
6 years ago
</div>
<% } else { %>
<div class="browse busuanzi"><i class="fas fa-eye fa-fw" aria-hidden="true"></i>
6 years ago
<span id="busuanzi_value_page_pv"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span>
6 years ago
</div>
<% } %>
6 years ago
<%- partial('categories',{post:post}) %>
6 years ago
</div>
6 years ago
</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
<section class='meta' id="footer-meta">
6 years ago
<time class="time" itemprop="dateUpdated" datetime="<%- moment(post.updated).format() %>" content="<%- date(post.updated, config.date_format) %>">
6 years ago
<i class="fas fa-pen fa-fw" aria-hidden="true"></i>
6 years ago
本文最后更新于:<%- date(post.updated, config.date_format) %>
</time>
6 years ago
<% if (post.tags && post.tags.length && post.tags.each) { %>
6 years ago
<%
var items = [];
post.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'">' + item.name + '</a>');
});
%>
6 years ago
<div class="tags">
6 years ago
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>
<%- items.join(', ') %>
</div>
<% } %>
6 years ago
</section>
7 years ago
6 years ago
<% if(post.prev || post.next){ %>
6 years ago
<div class="prev-next">
6 years ago
<% if(post.prev){ %>
6 years ago
<section class="prev">
6 years ago
<span class="art-item-left">
6 years ago
<h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;上一篇</h6>
6 years ago
<h4>
<a href="<%=url_for(post.prev.path)%>" rel="prev" title="<%=post.prev.title%>">
6 years ago
<% if(post.prev.title){ %>
<%= post.prev.title %>
<% } else if (post.prev.date) { %>
<%= date(post.prev.date, config.date_format) %>
<% } %>
6 years ago
</a>
</h4>
6 years ago
<% if (post.prev.tags && post.prev.tags.length && post.prev.tags.each) { %>
6 years ago
<%
var items = [];
post.prev.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'">' + item.name + '</a>');
});
%>
6 years ago
<h6 class="tags">
6 years ago
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>
<%- items.join(', ') %>
6 years ago
</h6>
6 years ago
<% } %>
</span>
</section>
6 years ago
<% } %>
<% if(post.next){ %>
6 years ago
<section class="next">
<span class="art-item-right" aria-hidden="true">
6 years ago
<h6>下一篇&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
6 years ago
<h4>
<a href="<%=url_for(post.next.path)%>" rel="prev" title="<%=post.next.title%>">
6 years ago
<% if(post.next.title){ %>
<%= post.next.title %>
<% } else if (post.next.date) { %>
<%= date(post.next.date, config.date_format) %>
<% } %>
6 years ago
</a>
</h4>
6 years ago
<% if (post.next.tags && post.next.tags.length && post.next.tags.each) { %>
6 years ago
<%
var items = [];
post.next.tags.each(function(item){
items.push('<a class="tag" href="'+url_for(item.path)+'">' + item.name + '</a>');
});
%>
6 years ago
<h6 class="tags">
6 years ago
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>
<%- items.join(', ') %>
6 years ago
</h6>
6 years ago
<% } %>
</span>
</section>
6 years ago
<%} %>
</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 && ((theme.recommended_posts && theme.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 comments">
6 years ago
<section class="article typo">
6 years ago
<% if (theme.recommended_posts && theme.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) { %>
6 years ago
6 years ago
<h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;评论</h4>
6 years ago
<% if (config.disqus_shortname) { %>
6 years ago
<section id="comments">
6 years ago
<div id="disqus_thread">
无法加载评论系统,请确保您的网络能够正常访问 <a href="https://disqus.com">Disqus</a> 。
6 years ago
</div>
</section>
<% } %>
6 years ago
<% if (config.livere_uid){ %>
6 years ago
<section id="comments">
6 years ago
<div id="lv-container" data-id="city" data-uid="<%= config.livere_uid %>">
6 years ago
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
6 years ago
</div>
6 years ago
</section>
<% } %>
6 years ago
<% if (config.valine){ %>
6 years ago
<% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
6 years ago
<div class="subtitle">
6 years ago
<h6><b>文明评论,请勿灌水。</b>为了便于区分和接收回复提醒,请您在留言时填写一下<b>昵称</b>和<b>邮箱</b>。</h6>
6 years ago
<div>
6 years ago
<section id="comments">
<div id="valine_container" class="valine_thread">
6 years ago
<i class="fas fa-spinner fa-spin fa-fw"></i>
6 years ago
</div>
</section>
6 years ago
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
6 years ago
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
6 years ago
<% } %>
<% } %>
<% } %>
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>