fix theme...
This commit is contained in:
63
themes/anzhiyu/layout/includes/post/post-copyright.pug
Normal file
63
themes/anzhiyu/layout/includes/post/post-copyright.pug
Normal file
@@ -0,0 +1,63 @@
|
||||
if theme.post_copyright.enable && page.copyright !== false
|
||||
- let author = page.copyright_author || config.author
|
||||
- let url = page.copyright_url || page.permalink
|
||||
- let info = page.copyright_info || _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title)
|
||||
.post-copyright
|
||||
.copyright-cc-box
|
||||
i.anzhiyufont.anzhiyu-icon-copyright
|
||||
.post-copyright__author_box
|
||||
- let copyright_author_img_back = theme.post_copyright.copyright_author_img_back ? theme.post_copyright.copyright_author_img_back : theme.avatar.img
|
||||
- let copyright_author_img_front = theme.post_copyright.copyright_author_img_front ? theme.post_copyright.copyright_author_img_front : theme.avatar.img
|
||||
- let copyright_author_link = theme.post_copyright.copyright_author_link ? theme.post_copyright.copyright_author_link : '/'
|
||||
a.post-copyright__author_img(href=url_for(copyright_author_link) title='头像')
|
||||
img.post-copyright__author_img_back(src=url_for(copyright_author_img_back) title='头像' alt='头像')
|
||||
img.post-copyright__author_img_front(src=url_for(copyright_author_img_front) title="头像" alt='头像')
|
||||
.post-copyright__author_name=author
|
||||
.post-copyright__author_desc=config.subtitle
|
||||
.post-copyright__post__info
|
||||
if (page.copyright_author && page.copyright_author !== config.author)
|
||||
a.post-copyright__reprint(title="该文章为转载文章,注意版权协议" href=url_for(url)) 转载
|
||||
else
|
||||
a.post-copyright__original(title="该文章为原创文章,注意版权协议" href=url_for(url)) 原创
|
||||
a.post-copyright-title
|
||||
span(onclick=`rm.copyPageUrl('${theme.post_copyright.decode ? decodeURI(url) : url}')`)=pageTitle
|
||||
//- ptool
|
||||
if theme.ptool.enable
|
||||
include ./ptool.pug
|
||||
.post-copyright__notice
|
||||
span.post-copyright-info!= info
|
||||
.post-tools-right
|
||||
if (!theme.ptool.categories)
|
||||
.tag_share
|
||||
.post-meta__box
|
||||
if (theme.post_meta.post.tags)
|
||||
.post-meta__box__tag-list
|
||||
each item, index in page.tags.data
|
||||
a(href=url_for(item.path)).post-meta__box__tags
|
||||
span.tags-punctuation
|
||||
i.anzhiyufont.anzhiyu-icon-tag
|
||||
=item.name
|
||||
span.tagsPageCount=item.length
|
||||
|
||||
!=partial('includes/third-party/share/index.pug', {}, {cache: true})
|
||||
else
|
||||
.tag_share
|
||||
.post-meta__box
|
||||
if (page.categories.data.length > 0)
|
||||
.post-meta__box__category-list
|
||||
each item, index in page.categories.data
|
||||
a(href=url_for(item.path)).post-meta__box__categoryes
|
||||
span.categoryes-punctuation
|
||||
i.anzhiyufont.anzhiyu-icon-inbox
|
||||
=item.name
|
||||
span.categoryesPageCount=item.length
|
||||
if (theme.post_meta.post.tags)
|
||||
.post-meta__box__tag-list
|
||||
each item, index in page.tags.data
|
||||
a(href=url_for(item.path)).post-meta__box__tags
|
||||
span.tags-punctuation
|
||||
i.anzhiyufont.anzhiyu-icon-tag
|
||||
=item.name
|
||||
span.tagsPageCount=item.length
|
||||
|
||||
!=partial('includes/third-party/share/index.pug', {}, {cache: true})
|
||||
54
themes/anzhiyu/layout/includes/post/ptool.pug
Normal file
54
themes/anzhiyu/layout/includes/post/ptool.pug
Normal file
@@ -0,0 +1,54 @@
|
||||
- let url = page.copyright_url || page.permalink
|
||||
if !theme.disable_top_img && page.top_img !== false
|
||||
if is_post()
|
||||
- var top_img = page.top_img || page.cover || page.randomcover
|
||||
else if is_page()
|
||||
- var top_img = page.top_img || theme.default_top_img
|
||||
else if is_home()
|
||||
- var top_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false
|
||||
else
|
||||
- var top_img = page.top_img || theme.default_top_img
|
||||
|
||||
if top_img !== false
|
||||
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? url_for(top_img) : top_img
|
||||
- var bg_img = top_img ? imgSource : ''
|
||||
- var site_title = page.title || page.tag || page.category || config.title
|
||||
#post-tools.post-tools
|
||||
.post-tools-left
|
||||
div.rewardLeftButton
|
||||
if theme.reward.enable && theme.reward.QR_code
|
||||
!=partial('includes/post/reward', {}, {cache: true})
|
||||
if theme.ptool.mode
|
||||
.reward-link.mode
|
||||
a.reward-link-button(href=url_for(theme.ptool.mode))
|
||||
i.anzhiyufont.anzhiyu-icon-plant-fill
|
||||
| 运营模式与责任
|
||||
div.shareRight
|
||||
if theme.ptool.share_mobile
|
||||
.share-link.mobile
|
||||
.share-qrcode
|
||||
.share-button(title='使用手机访问这篇文章')
|
||||
i.anzhiyufont.anzhiyu-icon-qrcode
|
||||
.share-main
|
||||
.share-main-all
|
||||
#qrcode(title=url)
|
||||
.reward-dec 使用手机访问这篇文章
|
||||
if theme.ptool.share_weibo
|
||||
.share-link.weibo
|
||||
a.share-button(target='_blank' href=`https://service.weibo.com/share/share.php?title=${site_title}&url=${url}&pic=${bg_img}` rel='external nofollow noreferrer noopener')
|
||||
i.anzhiyufont.anzhiyu-icon-weibo
|
||||
if theme.ptool.share_copyurl
|
||||
script.
|
||||
function copyCurrentPageUrl() {
|
||||
var currentPageUrl = window.location.href;
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("value", currentPageUrl);
|
||||
document.body.appendChild(input);
|
||||
input.select();
|
||||
input.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(input);
|
||||
}
|
||||
.share-link.copyurl
|
||||
#post-share-url.share-button(title='复制链接' onclick='copyCurrentPageUrl()')
|
||||
i.anzhiyufont.anzhiyu-icon-link
|
||||
18
themes/anzhiyu/layout/includes/post/reward.pug
Normal file
18
themes/anzhiyu/layout/includes/post/reward.pug
Normal file
@@ -0,0 +1,18 @@
|
||||
.post-reward(onclick='anzhiyu.addRewardMask()')
|
||||
.reward-button.button--animated(title='赞赏作者')
|
||||
i.anzhiyufont.anzhiyu-icon-hand-heart-fill
|
||||
| 打赏作者
|
||||
.reward-main
|
||||
.reward-all
|
||||
span.reward-title 感谢你赐予我前进的力量
|
||||
ul.reward-group
|
||||
each item in theme.reward.QR_code
|
||||
- var clickTo = item.link ? item.link : item.img
|
||||
li.reward-item
|
||||
a(href=url_for(clickTo) target='_blank')
|
||||
img.post-qr-code-img(src=url_for(item.img) alt=item.text)
|
||||
.post-qr-code-desc=item.text
|
||||
a.reward-main-btn(href='/about/#about-reward' target='_blank')
|
||||
.reward-text 赞赏者名单
|
||||
.reward-dec 因为你们的支持让我意识到写文章的价值🙏
|
||||
#quit-box(onclick="anzhiyu.removeRewardMask()" style="display: none")
|
||||
Reference in New Issue
Block a user