diff options
-rwxr-xr-x | theme/javascript/utils/sharing.js | 5 | ||||
-rw-r--r-- | theme/templates/includes/book/header.html | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/theme/javascript/utils/sharing.js b/theme/javascript/utils/sharing.js index caf97fb..4889b40 100755 --- a/theme/javascript/utils/sharing.js +++ b/theme/javascript/utils/sharing.js @@ -13,6 +13,9 @@ define([ }, "google-plus": function($el) { window.open("https://plus.google.com/share?url="+encodeURIComponent(url)) + }, + "weibo": function($el) { + window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(url)+"&title="+encodeURIComponent(title)) } }; @@ -30,4 +33,4 @@ define([ return { init: init }; -});
\ No newline at end of file +}); diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html index 5be0de3..9b36af8 100644 --- a/theme/templates/includes/book/header.html +++ b/theme/templates/includes/book/header.html @@ -21,6 +21,9 @@ {% if options.links.sharing.twitter !== false %} <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a> {% endif %} + {% if options.links.sharing.weibo === true %} + <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="weibo" aria-label="Share on Weibo"><i class="fa fa-weibo"></i></a> + {% endif %} <!-- Title --> <h1> |