|
|
|
<!-- 显示推荐文章和评论 -->
|
|
|
|
<%
|
|
|
|
var enableDisqus = false;
|
|
|
|
var enableLivere = false;
|
|
|
|
var enableGitalk = false;
|
|
|
|
var enableValine = false;
|
|
|
|
if (theme.comments && page && page.comments == true) {
|
|
|
|
if (theme.comments.disqus && theme.comments.disqus.shortname) {
|
|
|
|
enableDisqus = true;
|
|
|
|
}
|
|
|
|
if (theme.comments.livere && theme.comments.livere.uid) {
|
|
|
|
enableLivere = true;
|
|
|
|
}
|
|
|
|
if (theme.comments.gitalk && theme.comments.gitalk.clientID) {
|
|
|
|
enableGitalk = true;
|
|
|
|
}
|
|
|
|
if (theme.comments.valine && theme.comments.valine.appId) {
|
|
|
|
enableValine = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
|
|
|
|
<% if (enableDisqus || enableLivere || enableGitalk || enableValine) { %>
|
|
|
|
<article class="post white-box comments <%- theme.style.body.effect.join(' ') %>">
|
|
|
|
<section class="article typo">
|
|
|
|
<p ct><%- theme.comments && theme.comments.title %></p>
|
|
|
|
<% if (theme.comments && theme.comments.subtitle) { %>
|
|
|
|
<p cst><%- theme.comments.subtitle %></p>
|
|
|
|
<% } %>
|
|
|
|
<% if (enableDisqus) { %>
|
|
|
|
<section id="comments">
|
|
|
|
<div id="disqus_thread">
|
|
|
|
<div><i class='fas fa-exclamation-triangle'></i> <%- __('post.comments_placeholder', 'Disqus') %></div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
<% if (enableLivere){ %>
|
|
|
|
<section id="comments">
|
|
|
|
<div id="lv-container" data-id="city" data-uid="<%= theme.comments.livere.uid %>">
|
|
|
|
<noscript><div><i class='fas fa-exclamation-triangle'> <%- __('post.comments_placeholder', 'Livere') %></div></noscript>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
<% if (enableGitalk){ %>
|
|
|
|
<section id="comments">
|
|
|
|
<div id="gitalk-container"></div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
<% if (enableValine){ %>
|
|
|
|
<section id="comments">
|
|
|
|
<div id="valine_container" class="valine_thread">
|
|
|
|
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
|
|
<% } else { %>
|
|
|
|
<% page.comments = false; %>
|
|
|
|
<% } %>
|