提交 c5e640ef 编写于 作者: C coortop

添加文章分享模块

上级 797a3b91
......@@ -392,6 +392,13 @@ post_widget:
# Show the horizon line before the text of the end.
horizon_line: true
# Article sharing
article_share:
enable: true
#Apps to share
#Optional value: qzone, qq, weibo, wechat, douban, google, facebook, twitter
application: weibo, qq, wechat, qzone, twitter
# Automatically retain article excerpt.
auto_excerpt:
enable: false
......
- var article_share = theme.article_share
div.post-share-container
div.social-share-text= "分享到:"
div.social-share(data-sites=`${article_share.application}`)
link(rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css")
script(src="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js")
......@@ -15,6 +15,9 @@ block content
+gallery(page)
!= page.content
if theme.article_share && theme.article_share.enable
include ./_partials/widgets/share.pug
footer.post-footer
if theme.post_widget.end_text.enable
div.post-end
......
......@@ -12,3 +12,4 @@
@import './copy-button.styl';
@import './sticky-top.styl';
@import './pagination.styl';
@import './share.styl';
.post-share-container {
width: 100%;
height: 40px;
margin-bottom: 25px;
}
.post-share-container > div {
height: 40px;
float: left;
line-height: 40px;
}
.post-share-container .social-share-text {
margin-right: 4px;
font-size: 16px;
}
.post-share-container .social-share > a {
margin: 0;
margin-right: 8px;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册