breaking changes: toc 配置更改,頁面支持 toc 顯示 close #636

feat: 代碼框設置高度限制,展開後按鈕不會消失,可點擊再次摺疊 close #637
feat: 增加 no-lightbox class 偵測,可配置 fancybox 和 medium-zoom 不應用於圖片 #636
fix: 修復開啟 lazyload 時, fancybox 的縮略圖顯示 lazyload 加載圖片的 bug
This commit is contained in:
Jerry committed 2021-08-18 00:07:31 +08:00
1 parent b5e3d2c2c3
commit 7210f5b431
9 files changed
+34 -18

No files matched your search

+2 -1
View File
@@ -175,7 +175,8 @@ index_post_content:
# toc (目錄)
toc:
enable: true
post: true
page: false
number: true
style_simple: false
+13 -4
View File
@@ -1,13 +1,22 @@
-
const titleVal = pageTitle.replace(/'/ig,"\\'")
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
var pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable
var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
let titleVal = pageTitle.replace(/'/ig,"\\'")
var showToc = false
if (theme.aside.enable) {
let tocEnable = false
if (is_post()) {
if (theme.toc.post) tocEnable = true
} else if (is_page()) {
if (theme.toc.page) tocEnable = true
}
const pageToc = page.toc === true || page.toc === false ? page.toc : tocEnable
showToc = pageToc && (toc(page.content) !== '' || page.encrypt == true )
}
-
script#config-diff.
+2 -2
View File
@@ -13,8 +13,8 @@
each item in i.link_list
.flink-list-item
a(href=url_for(item.link) title=item.name target="_blank")
.flink-item-icon.not-lightbox
img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
.flink-item-icon
img.no-lightbox(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
.flink-item-name= item.name
.flink-item-desc(title=item.descr)= item.descr
!= page.content
Loaded 3 of 9 files, more files were not shown because too many files have changed in this diff. Show more