From 0926ec4c73cb72d537daec945fa0ccc56933b706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E=E8=B1=AA?= <1074627678@qq.com> Date: Mon, 4 Feb 2019 13:57:41 +0800 Subject: [PATCH] Optimize the display of comment count and reward button * Put the tips of comment-number prompt outside label * Fix reward button bug which occurs with plugin hexo-all-minifier --- layout/_macro/post.swig | 18 ++++++++++++------ layout/_partials/post/reward.swig | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 46f9d16f4f..a542d62363 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -148,37 +148,43 @@ {% endmacro %} {% if theme.facebook_comments_plugin.enable %} {{ comments() }} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} 0 + 0 {% elseif theme.disqus.enable and theme.disqus.count %} {{ comments() }} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} + {% elseif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} {{ comments() }} {% if is_post() %} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} + {% else %} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} + {% endif %} {% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %} {{ comments() }} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} + {% elseif (is_post() or theme.valine.comment_count) and theme.valine.enable and theme.valine.appid and theme.valine.appkey %} {{ comments() }} + {{ __('post.comments_count') + __('symbol.colon') }} - {{ __('post.comments_count') + __('symbol.colon') }} + {% endif %} diff --git a/layout/_partials/post/reward.swig b/layout/_partials/post/reward.swig index 4b0f7d159c..f27ae4e2d7 100644 --- a/layout/_partials/post/reward.swig +++ b/layout/_partials/post/reward.swig @@ -1,6 +1,6 @@
{{ theme.reward.comment }}
-