fix: 修復在modern樣式下,note 標簽外掛沒有使用tags名時,沒有背景色和夜間模式文字顯示不清楚的bugs

fix: 修復主頁文章cover在深色模式下,邊角有小白邊的bugs close #278
fix: 修復note標簽外掛下,代碼塊顯示背景色的bugs close #339
This commit is contained in:
Jerry 2020-08-27 21:47:40 +08:00
parent 40fd319cb2
commit ee6f62f4bc
4 changed files with 16 additions and 13 deletions

View File

@ -70,7 +70,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
'<img class="relatedPosts_cover" ' + '<img class="relatedPosts_cover" ' +
lazySrc + lazySrc +
'="' + '="' +
cover + this.url_for(cover) +
'">' '">'
if (dateType === 'created') { if (dateType === 'created') {
result += result +=

View File

@ -44,13 +44,17 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
#page-header #page-header
background-color: #121212 background-color: #121212
#article-container #article-container
code code
background: #2c2c2c background: #2c2c2c
pre > code pre > code
background: 0 background: 0
.note
code
background: $code-background
// //
#page-header #page-header
&:before &:before
@ -77,7 +81,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
figure.highlight figure.highlight
box-shadow: none box-shadow: none
if hexo-config('rootConfig.highlight') && hexo-config('rootConfig.highlight.enable') if hexo-config('rootConfig.highlight') && hexo-config('rootConfig.highlight.enable')
table::-webkit-scrollbar-thumb table::-webkit-scrollbar-thumb
background: lighten(#121212, 5) background: lighten(#121212, 5)
@ -87,7 +91,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
.hljs .hljs
background-color: lighten(#121212, 2) !important background-color: lighten(#121212, 2) !important
pre[class*='language-']::-webkit-scrollbar-thumb pre[class*='language-']::-webkit-scrollbar-thumb
background: lighten(#121212, 5) background: lighten(#121212, 5)

View File

@ -7,11 +7,14 @@
flex-direction: row flex-direction: row
align-items: center align-items: center
height: 20em height: 20em
border-radius: 8px border-radius: 12px 8px 8px 12px
background: var(--card-bg) background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06) box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
transition: all .3s transition: all .3s
+maxWidth768()
border-radius: 12px 12px 8px 8px
&:hover &:hover
box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15) box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)

View File

@ -4,7 +4,6 @@
position: relative position: relative
margin: 0 0 1rem margin: 0 0 1rem
padding: 15px padding: 15px
if ($note-style == 'simple') if ($note-style == 'simple')
border: 1px solid #EEEEEE border: 1px solid #EEEEEE
@ -12,14 +11,14 @@
if ($note-style == 'modern') if ($note-style == 'modern')
border: 1px solid transparent border: 1px solid transparent
background-color: var(--white)smoke background-color: #f5f5f5
color: $font-black
if ($note-style == 'flat') if ($note-style == 'flat')
border: initial border: initial
color: $font-black
border-left: 5px solid #EEEEEE border-left: 5px solid #EEEEEE
background-color: lighten(#EEEEEE, 65%) background-color: lighten(#EEEEEE, 65%)
color: $font-black
if hexo-config('note.border_radius') is a 'unit' if hexo-config('note.border_radius') is a 'unit'
border-radius: unit(hexo-config('note.border_radius'), px) border-radius: unit(hexo-config('note.border_radius'), px)
@ -50,9 +49,6 @@
&:last-child &:last-child
margin-bottom: 0 !important margin-bottom: 0 !important
code
background: $code-background !important
if $note-icons if $note-icons
&:not(.no-icon) &:not(.no-icon)