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.
60 lines
2.0 KiB
60 lines
2.0 KiB
<!-- 显示推荐文章和评论 --> |
|
<% |
|
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; %> |
|
<% } %>
|
|
|