|
@@ -1,56 +1,99 @@
|
|
|
<article id="<%= post.layout %>-<%= post.slug %>"
|
|
|
- class="post white-box article-type-<%= post.layout %>"
|
|
|
- itemscope itemprop="blogPost">
|
|
|
- <section class='meta'>
|
|
|
- <h2 class="title">
|
|
|
- <a href="<%- url_for(post.path) %>">
|
|
|
- <%= post.title %>
|
|
|
- </a>
|
|
|
- </h2>
|
|
|
- <time>
|
|
|
- <%= date(post.date, 'MMM D, YYYY') %>
|
|
|
- </time>
|
|
|
- <%- partial('categories',{post:post}) %>
|
|
|
- </section>
|
|
|
- <% if(post.toc!==false){ %>
|
|
|
- <section class="toc-wrapper"><%- toc(post.content) %></section>
|
|
|
- <% } %>
|
|
|
- <section class="article typo">
|
|
|
- <div class="article-entry" itemprop="articleBody">
|
|
|
- <%- post.content %>
|
|
|
- </div>
|
|
|
- <% if (post.tags && post.tags.length) { %>
|
|
|
- <div class="article-tags tags">
|
|
|
- <% post.tags.each(function(item){ %>
|
|
|
- <a href="<%- url_for(item.path) %>"><%=item.name %></a>
|
|
|
- <%})%>
|
|
|
- </div>
|
|
|
+ class="post white-box article-type-<%= post.layout %>"
|
|
|
+ itemscope itemprop="blogPost">
|
|
|
+ <section class='meta'>
|
|
|
+ <h2 class="title">
|
|
|
+ <a href="<%- url_for(post.path) %>">
|
|
|
+ <%= post.title %>
|
|
|
+ </a>
|
|
|
+ </h2>
|
|
|
+ <time>
|
|
|
+ <%= date(post.date, 'MMM D, YYYY') %>
|
|
|
+ </time>
|
|
|
+ <%- partial('categories', {post: post}) %>
|
|
|
+ </section>
|
|
|
+ <% if(post.toc !== false){ %>
|
|
|
+ <section class="toc-wrapper"><%- toc(post.content) %></section>
|
|
|
<% } %>
|
|
|
-
|
|
|
- <% if(post.prev || post.next){ %>
|
|
|
- <div class="art-item-footer">
|
|
|
- <% 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%>">
|
|
|
+ <section class="article typo">
|
|
|
+ <div class="article-entry" itemprop="articleBody">
|
|
|
+ <%- post.content %>
|
|
|
+ </div>
|
|
|
+ <% if (post.tags && post.tags.length) { %>
|
|
|
+ <div class="article-tags tags">
|
|
|
+ <% post.tags.each(function(item){ %>
|
|
|
+ <a href="<%- url_for(item.path) %>"><%= item.name %></a>
|
|
|
+ <% }) %>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+
|
|
|
+ <% if(post.prev || post.next){ %>
|
|
|
+ <div class="art-item-footer">
|
|
|
+ <% 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 %>">
|
|
|
<%= post.prev.title %>
|
|
|
</a></span>
|
|
|
- <% } %>
|
|
|
- <% if(post.next){ %>
|
|
|
- <span class="art-item-right">next:<a href="<%=url_for(post.next.path) %>" rel="next" title="<%=post.next.title %>">
|
|
|
- <%=post.next.title %>
|
|
|
+ <% } %>
|
|
|
+ <% if(post.next){ %>
|
|
|
+ <span class="art-item-right">next:<a href="<%= url_for(post.next.path) %>" rel="next"
|
|
|
+ title="<%= post.next.title %>">
|
|
|
+ <%= post.next.title %>
|
|
|
</a><i class="icon icon-chevron-thin-right"></i></span>
|
|
|
- <%} %>
|
|
|
- </div>
|
|
|
- <%} %>
|
|
|
- </section>
|
|
|
- <% if (post.comments && config.disqus_shortname){ %>
|
|
|
- <section id="comments">
|
|
|
- <div id="disqus_thread"></div>
|
|
|
- </section>
|
|
|
- <% } %>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <!--打赏-->
|
|
|
+ <div class="reward">
|
|
|
+ <div class="reward-button">赏 <span class="reward-code">
|
|
|
+ <span class="alipay-code"> <img class="alipay-img wdp-appear" src="https://dzdy-1252491474.cos.ap-chengdu.myqcloud.com/alipay.jpg"><b>支付宝打赏</b> </span>
|
|
|
+ <span class="wechat-code"> <img class="wechat-img wdp-appear" src="https://dzdy-1252491474.cos.ap-chengdu.myqcloud.com/wechat.jpg"><b>微信打赏</b> </span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <p class="reward-notice">如果文章对你有帮助,欢迎点击上方按钮打赏作者</p>
|
|
|
+ </div>
|
|
|
+ <!--打赏-->
|
|
|
+
|
|
|
+ <% if (post.comments && config.disqus_shortname){ %>
|
|
|
+ <section id="comments">
|
|
|
+ <div id="disqus_thread"></div>
|
|
|
+ </section>
|
|
|
+ <% } %>
|
|
|
+
|
|
|
+ <% if (theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %>
|
|
|
+ <section id="comments">
|
|
|
+ <div id="valine_container" class="valine_thread"></div>
|
|
|
+ <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
|
|
+ <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
|
|
|
+ <script>
|
|
|
+ var GUEST_INFO = ['nick', 'mail', 'link'];
|
|
|
+ var guest_info = '<%= theme.valine.guest_info %>'.split(',').filter(function (item) {
|
|
|
+ return GUEST_INFO.indexOf(item) > -1
|
|
|
+ });
|
|
|
+ var notify = '<%= theme.valine.notify %>' == true;
|
|
|
+ var verify = '<%= theme.valine.verify %>' == true;
|
|
|
+ var valine = new Valine();
|
|
|
+ valine.init({
|
|
|
+ el: '#valine_container',
|
|
|
+ notify: notify,
|
|
|
+ verify: verify,
|
|
|
+ guest_info: guest_info,
|
|
|
+ appId: "<%= theme.valine.appId %>",
|
|
|
+ appKey: "<%= theme.valine.appKey %>",
|
|
|
+ placeholder: "<%= theme.valine.placeholder %>",
|
|
|
+ pageSize: '<%= theme.valine.pageSize %>',
|
|
|
+ avatar: '<%= theme.valine.avatar %>',
|
|
|
+ lang: '<%= theme.valine.lang %>'
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+ </section>
|
|
|
+ <% } %>
|
|
|
</article>
|
|
|
<script>
|
|
|
- window.subData = {
|
|
|
- title: '<%= post.title %>',
|
|
|
- tools: true
|
|
|
- }
|
|
|
+ window.subData = {
|
|
|
+ title: '<%= post.title %>',
|
|
|
+ tools: true
|
|
|
+ }
|
|
|
</script>
|