blog/themes/typing/layout/_partial/article.ejs

94 lines
3.7 KiB
Plaintext

<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<%- partial('_partial/header') %>
<hr/>
<div class="article-inner">
<%- partial('post/gallery') %>
<% if (post.link || post.title){ %>
<header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %>
</header>
<% } %>
<div class="article-entry typo" itemprop="articleBody">
<% if (post.excerpt && index){ %>
<%- post.excerpt %>
<% if (theme.excerpt_link){ %>
<p class="article-more-link">
<a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
</p>
<% } %>
<% } else { %>
<%- post.content %>
<% } %>
<% if (theme.donate.enable){ %>
<div id="donate" class="donate">
<a id="github" href="<%= theme.donate.github %>" target="_blank" class="pos-f tr3" title="Github"></a>
<div id="DonateText" class="tr3">Donate</div>
<ul id="donateBox" class="list pos-f tr3">
<li id="PayPal"><a href="<%= theme.donate.paypal %>" target="_blank">PayPal</a></li>
<li id="BTC" data-footnote="Copy addres and show QRCode"><button id="BTCBn" data-clipboard-target="#btc-key" alt="Copy to clipboard">Bitcoin</button></li>
<li id="AliPay">AliPay</li>
<li id="WeChat">WeChat</li>
</ul>
<div id="QRBox" class="pos-f left-100">
<div id="BTCQR" class="MainBox" style="background-image: url(<%= theme.donate.BTCQR %>)"></div>
<div id="AliPayQR" class="MainBox" style="background-image: url(<%= theme.donate.AliPayQR %>)"></div>
<div id="WeChatQR" class="MainBox" style="background-image: url(<%= theme.donate.WeChatQR %>)"></div>
</div>
<!-- Bitcoin 账号 -->
<input id="btc-key" type="text" value="<%= theme.donate.bitcoin %>" readonly="readonly">
</div>
<% } %>
</div>
<footer class="article-footer">
<ul class="article-meta">
<li>
<span class="label"><%= __('date_published') %>:</span>
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
</li>
<% if (post.categories && post.categories.length) { %>
<li>
<span class="label"><%= __('category') %>:</span>
<%- partial('post/category') %>
</li>
<% } %>
<% if (post.tags && post.tags.length){ %>
<li>
<span class="label"><%= __('tag') %>:</span>
<%- partial('post/tag') %>
</li>
<% } %>
<hr/>
</ul>
</footer>
</div>
<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
</article>
<% if (!index && post.comments && theme.gitment.owner && theme.gitment.repo && theme.gitment.client.id && theme.gitment.client.secret){ %>
<section id="comments" class="comments">
<div id="gitment_container"></div>
</section>
<% } %>
<% if(!index && post.comments && theme.utterances.enable && theme.utterances.repo){ %>
<section id="comments" class="comments">
<div id="utterances_container"></div>
</section>
<% } %>
<% if (!index && post.comments && config.disqus_shortname){ %>
<section id="comments" class="comments">
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
<% } %>
<% if(!index && post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %>
<section id="comments" class="comments">
<div id="valine_container"></div>
</section>
<% } %>