fix related_posts

This commit is contained in:
xaoxuu 2021-03-09 22:14:20 +08:00
parent 5bb64e5ffc
commit ace3bc34d4
1 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,16 @@
<div class='related-wrap' id='related-posts'><%-
popular_posts_wrapper({
<%
function layoutDiv() {
if (theme.article.related_posts.enable) {
var el = '';
el += '<div class="related-wrap" id="related-posts">';
el += popular_posts_wrapper({
title: __('meta.related_posts'),
json: popular_posts_json({ maxCount: 5 , ulClass: 'related-posts' , PPMixingRate: 0.2 , isImage: true , isExcerpt: true} , page )
}) %></div>
});
el += '</div>';
return el;
}
return;
}
%>
<%- layoutDiv() %>