mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:20:53 +08:00
feat: toc改為aside顯示,去掉sidebar feat: 手機toc ui 修改 feat: 去掉 toc auto_open 配置 feat: 文章標題改為居中 improvement: 完善note標籤在readmode上的顯示 improvement: 精簡css 和 js improvement: pjax 優化 fix: 修復當文章頁top_img設為false時,閲讀模式下文章內容不顯示的bugs
20 lines
714 B
Plaintext
20 lines
714 B
Plaintext
-
|
|
let isHighlightShrink
|
|
if (theme.highlight_shrink == 'none') isHighlightShrink = 'undefined'
|
|
else if (page.highlight_shrink === true || page.highlight_shrink === false) isHighlightShrink = page.highlight_shrink
|
|
else isHighlightShrink = theme.highlight_shrink
|
|
|
|
const pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable
|
|
const showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
|
|
-
|
|
|
|
script#config_change
|
|
.
|
|
var GLOBAL_CONFIG_SITE = {
|
|
isPost: !{is_post()},
|
|
isHome: !{is_home()},
|
|
isHighlightShrink: !{isHighlightShrink},
|
|
isToc: !{showToc},
|
|
postUpdate: '!{full_date(page.updated)}'
|
|
}
|