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.

52 lines
1.9 KiB

6 years ago
<!-- 显示推荐文章和评论 -->
6 years ago
<%
var displayRecommentedPosts = false;
var displayComments = false;
if (page && theme.services) {
if (theme.services.recommended_posts == true && theme.recommended_posts && theme.recommended_posts.autoDisplay == false && page.layout == 'post' && page.recommended_posts != false) {
displayRecommentedPosts = true;
}
6 years ago
if ((config.disqus_shortname || config.livere_uid || config.valine) && theme.services.comments == true && page.comments != false) {
6 years ago
displayComments = true;
}
}
%>
<% if (displayRecommentedPosts || displayComments) { %>
6 years ago
<article class="post white-box comments">
<section class="article typo">
6 years ago
6 years ago
<% if (displayRecommentedPosts) { %>
6 years ago
<%- partial('recommended_posts', {page: page, site: site}) %>
<% } %>
6 years ago
6 years ago
<% if (displayComments) { %>
6 years ago
<h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;<%- __('post.comments') %></h4>
6 years ago
<% if (config.disqus_shortname) { %>
<section id="comments">
<div id="disqus_thread">
6 years ago
<%- __('post.comments_placeholder') %> <a href="https://disqus.com">Disqus</a> 。
6 years ago
</div>
</section>
<% } %>
<% if (config.livere_uid){ %>
<section id="comments">
<div id="lv-container" data-id="city" data-uid="<%= config.livere_uid %>">
6 years ago
<noscript>⚠ <%- __('post.comments_placeholder') %></noscript>
6 years ago
</div>
</section>
<% } %>
<% if (config.valine){ %>
<% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
<section id="comments">
<div id="valine_container" class="valine_thread">
<i class="fas fa-spinner fa-spin fa-fw"></i>
</div>
</section>
<% } %>
<% } %>
<% } %>
</section>
</article>
6 years ago
<% } %>