From 978595c3f33e1f74debf2b7d2c5c992eeef03c39 Mon Sep 17 00:00:00 2001 From: xiaoxiao Date: Fri, 11 Jan 2019 12:51:01 +0800 Subject: [PATCH] code is better --- layout/_macro/post.swig | 50 +++++++++++------------------------------ 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 3e81d806c4..8c662648ae 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -139,22 +139,12 @@ {% endif %} {% if post.comments %} - {% if theme.facebook_comments_plugin.enable %} - - - - - 0 - - - {% elseif theme.disqus.enable and theme.disqus.count %} + {% if theme.disqus.enable and theme.disqus.count %} {% if __('disqus') !== 'disqus' -%} @@ -162,13 +152,7 @@ - {% elseif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} - - - {% if is_post() %} @@ -178,27 +162,19 @@ {% endif %} - {% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %} - - - - - - - - {% elseif (is_post() or theme.valine.comment_count) and theme.valine.enable and theme.valine.appid and theme.valine.appkey %} - - - - - - - + {% else %} + + + {% if theme.facebook_comments_plugin.enable %} + 0 + {% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %} + + {% elseif (is_post() or theme.valine.comment_count) and theme.valine.enable and theme.valine.appid and theme.valine.appkey %} + + {% endif %} + {% endif %} + {% endif %} {# LeanCould PageView #}