Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,7 @@ gitment:
#baidushare:
## type: button

# Share
# This plugin is more useful in China, make sure you known how to use it.
# And you can find the use guide at official webiste: http://www.jiathis.com/.
# Warning: JiaThis does not support https.
#jiathis:
##uid: Get this uid from http://www.jiathis.com/

# addthis Share, see: https://www.addthis.com/
#add_this_id:

# NeedMoreShare2
Expand Down
11 changes: 11 additions & 0 deletions layout/_layout.swig
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,18 @@
</span>
</div>
{% endif %}

{% if theme.baidushare and theme.baidushare.type === "slide" %}
<div>
{% include '_partials/share/baidushare.swig' %}
</div>
{% endif %}

{% if theme.add_this_id %}
<div>
{% include '_partials/share/add-this.swig' %}
</div>
{% endif %}
</div>

{% include '_scripts/vendors.swig' %}
Expand Down
26 changes: 19 additions & 7 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
{% endif %}

{% if not is_index %}
{% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) %}
{% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) or (theme.baidushare and theme.baidushare.type === "button" )%}
<div class="post-widgets">
{% if theme.rating.enable %}
<div class="wp_rating">
Expand All @@ -388,6 +388,9 @@
{% endif %}

{% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %}
{% if theme.rating.enable %}
<span class="post-meta-divider">|</span>
{% endif %}
<div class="social-like">
{% if theme.vkontakte_api.enable and theme.vkontakte_api.like %}
<div class="vk_like">
Expand All @@ -403,14 +406,23 @@
</div>
{% endif %}

{% if theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable %}
{% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %}
{% if (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) or (theme.baidushare.type === "button") %}
{% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %}
<span class="post-meta-divider">|</span>
{% endif %}
<div id="needsharebutton-postbottom">
<span class="btn">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</span>
<div class="social_share">
{% if theme.baidushare.type === "button" %}
<div>
{% include '../_partials/share/baidushare.swig' %}
</div>
{% endif %}
{% if theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable %}
<div id="needsharebutton-postbottom">
<span class="btn">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</span>
</div>
{% endif %}
</div>
{% endif %}
</div>
Expand Down
25 changes: 0 additions & 25 deletions layout/_partials/share/jiathis.swig

This file was deleted.

10 changes: 0 additions & 10 deletions layout/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@

<div id="posts" class="posts-expand">
{{ post_template.render(page) }}

<div class="post-spread">
{% if theme.jiathis %}
{% include '_partials/share/jiathis.swig' %}
{% elseif theme.baidushare %}
{% include '_partials/share/baidushare.swig' %}
{% elseif theme.add_this_id %}
{% include '_partials/share/add-this.swig' %}
{% endif %}
</div>
</div>

{% endblock %}
Expand Down
10 changes: 9 additions & 1 deletion source/css/_common/components/post/post-widgets.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
align-items: center;

.post-meta-divider {
height: 28px;
height: 25px;
color: $grey-dark;
}
}
Expand Down Expand Up @@ -39,3 +39,11 @@
height: 30px;
align-self: center;
}

.bdsharebuttonbox {
margin-top: 10px;
display: flex;
justify-content: center;
a { border: none; }
}
.bdshare-slide-button-box a { border: none; }
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
@import "post-gallery";
@import "post-reward" if hexo-config('alipay') or hexo-config('wechatpay') or hexo-config('bitcoin');
@import "post-copyright" if hexo-config('post_copyright.enable');
@import "post-widgets" if (hexo-config('facebook_sdk.enable') and hexo-config('facebook_sdk.like_button')) or (hexo-config('vkontakte_api.enable') and hexo-config('vkontakte_api.like')) or hexo-config('rating.enable') or (hexo-config('needmoreshare2.enable') and hexo-config('needmoreshare2.postbottom.enable'));
@import "post-widgets" if (hexo-config('facebook_sdk.enable') and hexo-config('facebook_sdk.like_button')) or (hexo-config('vkontakte_api.enable') and hexo-config('vkontakte_api.like')) or hexo-config('rating.enable') or (hexo-config('needmoreshare2.enable') and hexo-config('needmoreshare2.postbottom.enable')) or hexo-config('baidushare');
@import "post-rtl";
@import "post-reading_progress" if hexo-config('reading_progress.enable');
12 changes: 0 additions & 12 deletions source/css/_common/components/third-party/baidushare.styl

This file was deleted.

10 changes: 0 additions & 10 deletions source/css/_common/components/third-party/jiathis.styl

This file was deleted.

2 changes: 0 additions & 2 deletions source/css/_common/components/third-party/third-party.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import "gitment" if hexo-config('gitment.enable');
@import "jiathis";
@import "han";
@import "baidushare";
@import "localsearch";
@import "busuanzi-counter";
@import "algolia-search" if hexo-config('algolia_search.enable');
Expand Down