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.
 
 
 

71 lines
2.4 KiB

<!-- 显示推荐文章和评论 -->
<%
var enableDisqus = false;
var enableLivere = false;
var enableGitalk = false;
var enableValine = false;
var enableMiniValine = 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 (theme.comments.minivaline && theme.comments.minivaline.appId) {
enableMiniValine = true;
}
}
%>
<% if (enableDisqus || enableLivere || enableGitalk || enableValine || enableMiniValine) { %>
<article class="post white-box reveal 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>&nbsp;<%- __('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'>&nbsp;<%- __('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-cog fa-spin fa-fw fa-2x"></i>
</div>
</section>
<% } %>
<% if (enableMiniValine){ %>
<section id="comments">
<div id="minivaline_container">
<i class="fas fa-cog fa-spin fa-fw fa-2x"></i>
</div>
</section>
<% } %>
</section>
</article>
<% } else { %>
<% page.comments = false; %>
<% } %>