breaking changes: 移除 html 的 font-size 改為瀏覽器默認大小

feat: 為文章單獨設置 TOC simple_style 顯示 closed #631
feat: page 頁頂部圖增加黑色遮罩 closed #671
feat: 首頁 pagination 更新 UI
fix: 修復使用本地搜索時,搜索插件配置為不搜索文章內容會無法使用搜索 的 bug
fix: 修復開啟 photofigcaption 後,導致inlineImg標籤外掛顯示錯亂的 bug
fix: 修復 字體過大/過小而導致 部分 ui 偏移的 bug
improvement: 主題 css 使用的 rem 改為 em 或 px
improvement: 修改没有顶部图下,文章页的标题大小 closed #669
improvement: 代碼優化
This commit is contained in:
Jerry
2021-09-20 17:55:20 +08:00
Unverified
parent 484f036adb
commit 3708fdf569
42 changed files with 387 additions and 425 deletions

View File

@@ -23,7 +23,7 @@ if $prismjsEnable
$code-block
overflow: auto
margin: 0 0 1rem
margin: 0 0 20px
padding: 0
background: var(--hl-bg)
color: var(--hl-color)
@@ -33,28 +33,6 @@ $code-block
counter-reset: line
white-space: pre-wrap
blockquote
margin: 0 0 1rem
padding: .1rem .8rem
border-left: .2rem solid $blockquote-padding-color
background-color: var(--blockquote-bg)
color: var(--blockquote-color)
a
word-break: break-all
p
margin: 0 !important
padding: .5rem 0
footer
padding: 0 0 .5rem
cite
&:before
padding: 0 .3em
content: ''
#article-container
pre,
code
@@ -62,7 +40,7 @@ blockquote
font-family: $code-font-family !important
code
padding: .1rem .2rem
padding: 2px 4px
background: $code-background
color: $code-foreground
@@ -87,7 +65,7 @@ blockquote
figcaption,
.caption
padding: .3rem 0 .1rem .7rem
padding: 6px 0 2px 14px
font-size: $code-font-size
line-height: 1em
@@ -104,7 +82,7 @@ blockquote
display: flex
align-items: center
overflow: hidden
min-height: 1.2rem
min-height: 24px
height: 2.15em
background: var(--hltools-bg)
color: var(--hltools-color)
@@ -115,12 +93,12 @@ blockquote
.expand
position: absolute
padding: .4rem .7rem
padding: .57em .7em
cursor: pointer
transition: transform .3s
& + .code-lang
left: 1.7rem
left: 1.6em
&.closed
transition: all .3s
@@ -128,7 +106,7 @@ blockquote
.code-lang
position: absolute
left: .7rem
left: 14px
text-transform: uppercase
font-weight: bold
font-size: 1.15em
@@ -136,13 +114,13 @@ blockquote
.copy-notice
position: absolute
right: 1.7rem
right: 2.1em
opacity: 0
transition: opacity .4s
.copy-button
position: absolute
right: .7rem
right: 14px
cursor: pointer
transition: color .2s
@@ -160,7 +138,7 @@ blockquote
if $highlight_theme == 'mac' || ($highlight_theme == 'mac light')
figure.highlight
margin: 0 0 1.2rem
margin: 0 0 24px
border-radius: 7px
box-shadow: 0 5px 10px 0 $highlight-mac-border
-webkit-transform: translateZ(0)
@@ -168,7 +146,7 @@ blockquote
.highlight-tools
&:after
position: absolute
left: .7rem
left: 14px
width: 12px
height: 12px
border-radius: 50%
@@ -184,13 +162,13 @@ blockquote
transform: rotate(90deg) !important
& ~ .copy-notice
right: 2.8rem
right: 3.3em
& ~ .copy-button
right: 1.8rem
right: 2.1em
.code-lang
left: 3.8rem !important
left: 75px
if hexo-config('highlight_height_limit')
.code-expand-btn
@@ -204,7 +182,7 @@ blockquote
cursor: pointer
i
padding: .3rem 0
padding: 6px 0
color: var(--hlnumber-color)
animation: code-expand-key 1.2s infinite

View File

@@ -7,8 +7,8 @@ if $highlight_theme != false
if wordWrap
&:before
display: inline-block
padding: 0 .3rem 0 0
min-width: 1.6rem
padding: 0 6px 0 0
min-width: 30px
color: var(--hlnumber-color)
content: counter(line)
counter-increment: line
@@ -27,13 +27,13 @@ if $highlight_theme != false
border: none
.gutter pre
padding-right: .5rem
padding-left: .5rem
padding-right: 10px
padding-left: 10px
background-color: var(--hlnumber-bg)
color: var(--hlnumber-color)
text-align: right
.code pre
padding-right: .5rem
padding-left: .5rem
padding-right: 10px
padding-left: 10px
width: 100%

View File

@@ -14,7 +14,7 @@ if $highlight_theme != false
.caption
margin-left: -3.8em
padding: .2rem .8rem !important
padding: 4px 16px !important
a
padding: 0 !important

View File

@@ -11,7 +11,7 @@ if $highlight_theme == 'darker' || ($highlight_theme == 'mac')
color: alpha($highlight-foreground, .8),
bg-color: darken($highlight-background, 2)
}
$highlight-scrollbar = darken($highlight-background, 6)
$highlight-scrollbar = lighten($highlight-background, 8)
if $highlighEnable
$highlight-comment = #969896
@@ -37,7 +37,7 @@ if $highlight_theme == 'pale night'
color: $highlight-foreground,
bg-color: darken($highlight-background, 2)
}
$highlight-scrollbar = darken($highlight-background, 6)
$highlight-scrollbar = lighten($highlight-background, 8)
if $highlighEnable
$highlight-comment = #676E95
@@ -63,7 +63,7 @@ if $highlight_theme == 'ocean'
color: $highlight-foreground,
bg-color: darken($highlight-background, 2)
}
$highlight-scrollbar = darken($highlight-foreground, 40)
$highlight-scrollbar = lighten($highlight-background, 8)
if $highlighEnable
$highlight-comment = rgba(101, 115, 126, .8)