From a2943d55b8bf6ed2333af4768e120e154cbe2130 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Thu, 25 Feb 2021 13:12:04 +0800 Subject: [PATCH] update --- _config.yml | 2 +- layout/_partial/main/article/references.ejs | 106 +++++++++++------- layout/_partial/main/navbar/breadcrumb.ejs | 4 +- source/css/_layout/base.styl | 11 ++ source/css/_layout/navbar.styl | 9 +- source/css/_layout/partial/read_next.styl | 2 + source/css/_layout/partial/references.styl | 21 +++- source/css/_layout/partial/related_posts.styl | 3 +- source/css/_layout/sidebar.styl | 3 +- source/css/_layout/tag-plugins/ghcard.styl | 5 - source/css/_layout/tag-plugins/timeline.styl | 6 +- source/js/main.js | 14 +++ 12 files changed, 124 insertions(+), 62 deletions(-) diff --git a/_config.yml b/_config.yml index 44dac86..0b74d3d 100755 --- a/_config.yml +++ b/_config.yml @@ -57,7 +57,7 @@ article: # 文章许可协议 license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) 许可协议,转载请注明出处。' # 分享 - share: [wechat, weibo, email, link] + share: # [weibo, email, link] # wechat 需要安装二维码插件: npm i hexo-helper-qrcode # 相关文章,需要安装插件 (for layout: post) # npm i hexo-related-popular-posts related_posts: diff --git a/layout/_partial/main/article/references.ejs b/layout/_partial/main/article/references.ejs index a920f8d..eae46b2 100644 --- a/layout/_partial/main/article/references.ejs +++ b/layout/_partial/main/article/references.ejs @@ -1,5 +1,8 @@ <% function layoutDiv() { + if (page.layout == 'wiki' && !page.references) { + return ''; + } let el = ''; el += '
'; if (page.references && page.references.length > 0) { @@ -19,53 +22,72 @@ function layoutDiv() { el += ''; } - if (theme.article.license && page.license != false) { - el += '
'; - el += '
'; - el += '' + __('meta.license') + ''; - el += '
'; - el += '
'; - el += markdown(page.license || theme.article.license); - el += '
'; - el += '
'; - } + if (page.layout == 'post') { + if (theme.article.license && page.license != false) { + el += '
'; + el += '
'; + el += '' + __('meta.license') + ''; + el += '
'; + el += '
'; + el += markdown(page.license || theme.article.license); + el += '
'; + el += '
'; + } - if (theme.article.share && page.share != false) { - el += '
'; - el += '
'; - el += '' + __('meta.share') + ''; - el += '
'; - el += '
'; + el += ''; + } } - el += ''; return el; } diff --git a/layout/_partial/main/navbar/breadcrumb.ejs b/layout/_partial/main/navbar/breadcrumb.ejs index 8df196a..77d41c8 100644 --- a/layout/_partial/main/navbar/breadcrumb.ejs +++ b/layout/_partial/main/navbar/breadcrumb.ejs @@ -36,8 +36,8 @@