update theme to butterfly

This commit is contained in:
2026-01-05 19:48:25 +08:00
parent a2934b5576
commit 9619cab07b
33 changed files with 440 additions and 999 deletions

View File

@@ -6,7 +6,11 @@ script.
ele.forEach((item, index) => {
const mermaidSrc = item.firstElementChild
const mermaidThemeConfig = `%%{init:{ 'theme':'${theme}'}}%%\n`
const config = mermaidSrc.dataset.config ? JSON.parse(mermaidSrc.dataset.config) : {}
if (!config.theme) {
config.theme = theme
}
const mermaidThemeConfig = `%%{init: ${JSON.stringify(config)}}%%\n`
const mermaidID = `mermaid-${index}`
const mermaidDefinition = mermaidThemeConfig + mermaidSrc.textContent