mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:50:54 +08:00
feat: 新增 Mermaid 圖表功能的選項,支持在新標籤頁中打開和縮放平移互動
fix: 更新插件版本以修正相容性問題 refactor: 優化代碼結構,提升可讀性
This commit is contained in:
4
layout/includes/third-party/math/mermaid.pug
vendored
4
layout/includes/third-party/math/mermaid.pug
vendored
@@ -281,9 +281,9 @@ script.
|
||||
const renderFn = mermaid.render(mermaidID, mermaidDefinition)
|
||||
const renderMermaid = svg => {
|
||||
mermaidSrc.insertAdjacentHTML('afterend', svg)
|
||||
initMermaidGestures(item)
|
||||
if (!{theme.mermaid.zoom_pan}) initMermaidGestures(item)
|
||||
item.__mermaidOriginalSvg = svg
|
||||
attachMermaidViewerButton(item)
|
||||
if (!{theme.mermaid.open_in_new_tab}) attachMermaidViewerButton(item)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user