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.
 
 
 

57 lines
1.9 KiB

<!-- 显示推荐文章和评论 -->
<%
var enableDisqus = false;
var enableLivere = false;
var enableGitalk = false;
var enableValine = false;
if (page && page.comments != false) {
if (config.disqus_shortname) {
enableDisqus = true;
}
if (config.livere_uid) {
enableLivere = true;
}
if (config.gitalk) {
enableGitalk = true;
}
if (theme.valine.enable && config.leancloud) {
enableValine = true;
}
}
%>
<% if (enableDisqus || enableLivere || enableGitalk || enableValine) { %>
<article class="post white-box comments <%- theme.style.shadow.card ? 'card-shadow' : '' %> <%- theme.style.blur && theme.style.blur.body ? 'body-blur' : '' %>">
<section class="article typo">
<h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;<%- __('post.comments') %></h4>
<% 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="<%= config.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-spinner fa-spin fa-fw"></i>
</div>
</section>
<% } %>
</section>
</article>
<% } else { %>
<% page.comments = false; %>
<% } %>