mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
feat: 優化代碼高亮系統並修復樣式問題 (v5.5.4-b1)
- 簡化 config.pug 中的高亮設置檢測邏輯 - 重構滾動條樣式,提取為可重用的 $scrollbar-style - 優化 JavaScript 代碼高亮邏輯,增加對默認高亮的支持 - 修復打賞彈窗的邊框圓角應用位置 - 改善代碼高亮工具的檢測和處理流程
This commit is contained in:
@@ -24,6 +24,14 @@ wordWrap = $highlight_enable && !$highlight_line_number && hexo-config('code_blo
|
||||
--hlscrollbar-bg: lighten(#121212, 5)
|
||||
--hlexpand-bg: linear-gradient(180deg, rgba(lighten(#121212, 2), .6), rgba(lighten(#121212, 2), .9))
|
||||
|
||||
$scrollbar-style
|
||||
// scrollbar - firefox
|
||||
@-moz-document url-prefix()
|
||||
scrollbar-color: var(--hlscrollbar-bg) transparent
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: var(--hlscrollbar-bg)
|
||||
|
||||
if $highlight_enable
|
||||
@require 'highlight/index'
|
||||
|
||||
@@ -88,6 +96,11 @@ $code-block
|
||||
&:hover
|
||||
border-bottom-color: var(--hl-color)
|
||||
|
||||
&.default
|
||||
pre
|
||||
padding: 10px 20px
|
||||
@extend $scrollbar-style
|
||||
|
||||
&.copy-true
|
||||
user-select: all
|
||||
-webkit-user-select: all
|
||||
|
||||
Reference in New Issue
Block a user