From ee6f62f4bcc045db22e94d530bde30c4a823b70e Mon Sep 17 00:00:00 2001 From: Jerry <16351105+jerryc127@users.noreply.github.com> Date: Thu, 27 Aug 2020 21:47:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=BE=A9=E5=9C=A8modern?= =?UTF-8?q?=E6=A8=A3=E5=BC=8F=E4=B8=8B=EF=BC=8Cnote=20=E6=A8=99=E7=B0=BD?= =?UTF-8?q?=E5=A4=96=E6=8E=9B=E6=B2=92=E6=9C=89=E4=BD=BF=E7=94=A8tags?= =?UTF-8?q?=E5=90=8D=E6=99=82=EF=BC=8C=E6=B2=92=E6=9C=89=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E5=A4=9C=E9=96=93=E6=A8=A1=E5=BC=8F=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=A1=AF=E7=A4=BA=E4=B8=8D=E6=B8=85=E6=A5=9A=E7=9A=84?= =?UTF-8?q?bugs=20fix:=20=E4=BF=AE=E5=BE=A9=E4=B8=BB=E9=A0=81=E6=96=87?= =?UTF-8?q?=E7=AB=A0cover=E5=9C=A8=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E9=82=8A=E8=A7=92=E6=9C=89=E5=B0=8F=E7=99=BD?= =?UTF-8?q?=E9=82=8A=E7=9A=84bugs=20close=20#278=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=BE=A9note=E6=A8=99=E7=B0=BD=E5=A4=96=E6=8E=9B=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E4=BB=A3=E7=A2=BC=E5=A1=8A=E9=A1=AF=E7=A4=BA=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2=E7=9A=84bugs=20close=20#339?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helpers/related_post.js | 2 +- source/css/_mode/darkmode.styl | 12 ++++++++---- source/css/_page/homepage.styl | 5 ++++- source/css/_tags/note.styl | 10 +++------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/scripts/helpers/related_post.js b/scripts/helpers/related_post.js index 4fa0c69..ed8dc38 100644 --- a/scripts/helpers/related_post.js +++ b/scripts/helpers/related_post.js @@ -70,7 +70,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) { '' if (dateType === 'created') { result += diff --git a/source/css/_mode/darkmode.styl b/source/css/_mode/darkmode.styl index 2c1ca6d..dcd73b2 100644 --- a/source/css/_mode/darkmode.styl +++ b/source/css/_mode/darkmode.styl @@ -44,13 +44,17 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark' #page-header background-color: #121212 - #article-container + #article-container code background: #2c2c2c - pre > code + pre > code background: 0 + .note + code + background: $code-background + // 頭部 #page-header &:before @@ -77,7 +81,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark' figure.highlight box-shadow: none - + if hexo-config('rootConfig.highlight') && hexo-config('rootConfig.highlight.enable') table::-webkit-scrollbar-thumb background: lighten(#121212, 5) @@ -87,7 +91,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark' .hljs background-color: lighten(#121212, 2) !important - + pre[class*='language-']::-webkit-scrollbar-thumb background: lighten(#121212, 5) diff --git a/source/css/_page/homepage.styl b/source/css/_page/homepage.styl index d682b01..9aa5ed4 100644 --- a/source/css/_page/homepage.styl +++ b/source/css/_page/homepage.styl @@ -7,11 +7,14 @@ flex-direction: row align-items: center height: 20em - border-radius: 8px + border-radius: 12px 8px 8px 12px background: var(--card-bg) box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06) transition: all .3s + +maxWidth768() + border-radius: 12px 12px 8px 8px + &:hover box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15) diff --git a/source/css/_tags/note.styl b/source/css/_tags/note.styl index 96d78ed..d0270ac 100644 --- a/source/css/_tags/note.styl +++ b/source/css/_tags/note.styl @@ -4,7 +4,6 @@ position: relative margin: 0 0 1rem padding: 15px - if ($note-style == 'simple') border: 1px solid #EEEEEE @@ -12,14 +11,14 @@ if ($note-style == 'modern') border: 1px solid transparent - background-color: var(--white)smoke - + background-color: #f5f5f5 + color: $font-black if ($note-style == 'flat') border: initial - color: $font-black border-left: 5px solid #EEEEEE background-color: lighten(#EEEEEE, 65%) + color: $font-black if hexo-config('note.border_radius') is a 'unit' border-radius: unit(hexo-config('note.border_radius'), px) @@ -50,9 +49,6 @@ &:last-child margin-bottom: 0 !important - - code - background: $code-background !important if $note-icons &:not(.no-icon)