From c25553c192ba3c012d101c34f146b98972834150 Mon Sep 17 00:00:00 2001 From: weilining <18277278902@163.com> Date: Sun, 21 Feb 2021 01:28:34 +0800 Subject: [PATCH 1/2] Improvement valine visitor --- layout/includes/header/post-info.pug | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layout/includes/header/post-info.pug b/layout/includes/header/post-info.pug index 0b11b61..1edae72 100644 --- a/layout/includes/header/post-info.pug +++ b/layout/includes/header/post-info.pug @@ -53,23 +53,23 @@ span= min2read(page.content, {cn: 350, en: 160}) + _p('post.min2read_unit') //- for pv and count - mixin pvBlock(parent_id,parent_class) + mixin pvBlock(parent_id,parent_class,parent_title) span.post-meta-separator | - span(class=parent_class id=parent_id) + span(class=parent_class id=parent_id data-flag-title=page.title) i.far.fa-eye.fa-fw.post-meta-icon span.post-meta-label=_p('post.page_pv') + ':' if block block if theme.busuanzi.page_pv - +pvBlock('','post-meta-pv-cv') + +pvBlock('','post-meta-pv-cv','') span#busuanzi_value_page_pv else if comments.use && !comments.lazyload if (comments.use.includes('Valine') && theme.valine.visitor) || (comments.use.includes('Waline') && theme.waline.visitor) - +pvBlock(url_for(page.path),'leancloud_visitors') + +pvBlock(url_for(page.path),'leancloud_visitors',page.title) span.leancloud-visitors-count else if (comments.use.includes('Twikoo') && theme.twikoo.visitor) - +pvBlock('','') + +pvBlock('','','') span#twikoo_visitors if comments.count && !comments.lazyload && page.comments !== false && comments.use From 245bdfc46f176259c999a527a666ad5c9c91a743 Mon Sep 17 00:00:00 2001 From: GZTime Date: Mon, 22 Feb 2021 21:08:44 +0800 Subject: [PATCH 2/2] add the layout of kbd tag --- source/css/_layout/post.styl | 14 ++++++++++++++ source/css/_mode/darkmode.styl | 7 ++++++- source/css/_mode/readmode.styl | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/source/css/_layout/post.styl b/source/css/_layout/post.styl index bce034a..d5a35ca 100644 --- a/source/css/_layout/post.styl +++ b/source/css/_layout/post.styl @@ -161,6 +161,20 @@ no-beautify() iframe margin: 0 0 1rem + kbd + margin: 0 3px + padding: 3px 5px + border-radius: 3px + border: 1px solid #b4b4b4 + box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 2px 1px 0 rgba(255,255,255,.6) inset + font-family: Monaco, 'Ubuntu Mono', monospace + font-size: 0.9em + font-weight: 600 + background-color: #f8f8f8 + color: #34495e + line-height: 1em + white-space: nowrap + if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'site' beautify() else if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'post' diff --git a/source/css/_mode/darkmode.styl b/source/css/_mode/darkmode.styl index ad4b4de..02e3a82 100644 --- a/source/css/_mode/darkmode.styl +++ b/source/css/_mode/darkmode.styl @@ -51,6 +51,11 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark' .aplayer filter: brightness(.8) + kbd + border-color: #696969 + background-color: #525252 + color: #e2f1ff + // 頭部 #page-header &.nav-fixed > #nav, @@ -154,4 +159,4 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark' background: #121212 #operare_artitalk .c2 - background: #121212 \ No newline at end of file + background: #121212 diff --git a/source/css/_mode/readmode.styl b/source/css/_mode/readmode.styl index dbe2308..552aa7e 100644 --- a/source/css/_mode/readmode.styl +++ b/source/css/_mode/readmode.styl @@ -163,6 +163,12 @@ if hexo-config('readmode') border-left: .2rem solid var(--gray) background-color: var(--readmode-light-color) + kbd + border: 1px solid var(--gray) + color: var(--font-color) + box-shadow: none + background-color: transparent + .hide-toggle border: 1px solid var(--gray) !important