Permalink
Browse files

add: Share Tool "AddThis"

http://www.addthis.com/

AddThis supports HTTPS

Closes #47
  • Loading branch information...
MOxFIVE committed Apr 2, 2016
1 parent 20b2e4f commit 4017757cdb52be40b361b1e38397d21805400d79
View
@@ -175,7 +175,13 @@ fancybox: true
mathjax: false
# Socail Share | 是否开启分享
share: true
share:
on: true
baidu: true
addthis: false
addthis_pubid: "ra-56ff76c972fc0cf9"
## Go to www.addthis.com/dashboard to get your pubid (in src of Code)
## and customize AddThis share buttons
# 百度、谷歌站长验证。填写 HTML 标签 content
# Site Verification for Google and Baidu. HTML label content.
@@ -59,7 +59,8 @@
<% if (!index && ((post.toc != false && !is_page() && theme.toc) || post.toc)){ %>
<%- partial('_partial/toc') %>
<% } %>
<% if (!index && theme.share){ %>
<% if (!index && theme.share.on && (post.share != false || post.share)){ %>
<%- partial('post/share') %>
<% } %>
View
@@ -79,6 +79,10 @@
</script>
<% } %>
<% if (theme.share.on && theme.share.addthis){ %>
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<%-theme.share.addthis_pubid%>"></script>
<% } %>
<% if (theme.baidu_tongji){ %>
<script>
var _hmt = _hmt || [];
@@ -1,5 +1,6 @@
<% if (theme.share) { %>
<div class="share">
<div class="share">
<% if (theme.share.baidu) { %>
<div class="bdsharebuttonbox">
<li id="bds_twi"><a href="#" class="bds_twi" data-cmd="twi" title="分享到推特"></a></li>
<li id="bds_tsina"><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a></li>
@@ -13,5 +14,12 @@
window._bd_share_config={
"common":{"bdSnsKey":{},"bdText":"<%- post.title %> | <%- config.title %> ","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
</div>
<% } %>
<% } %>
<% if (theme.share.addthis) { %>
<div class="addthis_sharing_toolbox"></div>
<% } %>
</div>
@@ -1,49 +1,58 @@
baidu-share = hexo-config("share.baidu")
addthis-share = hexo-config("share.addthis")
.share
padding-left 40px
margin 1em auto .5em
opacity .5
&:hover
opacity 1
.bdsharebuttonbox
font-family Arial
li
display inline-block
width 28px
height @width
margin-right 2px
font 20px FontAwesome
background #6f7170
text-align center
vertical-align middle
box-shadow 1px 1px 1px rgba(0,0,0, .1), 1px 1px 1px rgba(0,0,0, .3)
a, .bds_more
float none
margin 0
padding 0
font @font
background-image none
color white
line-height @width
if baidu-share
.bdsharebuttonbox
font-family Arial
li
display inline-block
width 28px
height @width
margin-right 2px
font 20px FontAwesome
background #6f7170
text-align center
vertical-align middle
box-shadow 1px 1px 1px rgba(0,0,0, .1), 1px 1px 1px rgba(0,0,0, .3)
a, .bds_more
float none
margin 0
padding 0
font @font
background-image none
color white
line-height @width
&:hover
opacity 1
&:hover
opacity 1
&:hover
opacity 1
transform scale(1.1)
a
color white
transform scale(1.1)
a
color white
// http://share.baidu.com/help/webid
font-logo = bds_tsina f18a #db332f,
bds_sqq f1d6 #1cbcef,
bds_copy f016 #8f8f8f,
bds_mail f003 #6fc0e4,
bds_weixin f1d7 #8cdc49,
bds_more f1e0 #8cbcf5,
bds_twi f099 #21abf4
// http://share.baidu.com/help/webid
font-logo = bds_tsina f18a #db332f,
bds_sqq f1d6 #1cbcef,
bds_copy f016 #8f8f8f,
bds_mail f003 #6fc0e4,
bds_weixin f1d7 #8cdc49,
bds_more f1e0 #8cbcf5,
bds_twi f099 #21abf4
for i in font-logo
.{i[0]}:before
content '\' + i[1]
#{i[0]}
background i[2]
for i in font-logo
.{i[0]}:before
content '\' + i[1]
#{i[0]}
background i[2]
if addthis-share
.addthis_sharing_toolbox
margin-top .5em
margin-left -2px
@@ -71,4 +71,6 @@ archives-color = rgba(255,255,255,.4)
root-url = hexo-config("root_url")
i-opacity = .75
toc-top = 378px
toc-top = 378px
share = hexo-config("share.on")
View
@@ -112,7 +112,10 @@ a {
@import "_partial/archive"
@import "_partial/highlight"
@import "_partial/footer"
@import "_partial/share"
if share
@import "_partial/share"
@import "_partial/page"
@import "_partial/instagram"
@import "_partial/tagcloud"

1 comment on commit 4017757

@MOxFIVE

This comment has been minimized.

Show comment
Hide comment
@MOxFIVE

MOxFIVE Apr 2, 2016

Owner

AddThis Sharing Buttons:
snip20160402_5

Owner

MOxFIVE commented on 4017757 Apr 2, 2016

AddThis Sharing Buttons:
snip20160402_5

Please sign in to comment.