adapt mermaid to dark mode (#1476)
Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com>
This commit is contained in:
parent
0e43b08837
commit
8a78d7b89f
@ -102,6 +102,10 @@ const uml = async className => {
|
||||
messageFontSize: "16px"
|
||||
}
|
||||
}
|
||||
if (document.body.classList.contains("dark")) {
|
||||
defaultConfig.theme = "dark"
|
||||
}
|
||||
|
||||
const Module = await import('./file=themes/mermaid_editor.js');
|
||||
|
||||
function do_render(block, code, codeContent) {
|
||||
|
@ -111,6 +111,7 @@ js_code_for_toggle_darkmode = """() => {
|
||||
} else {
|
||||
document.querySelector('body').classList.add('dark');
|
||||
}
|
||||
document.querySelectorAll('code2').forEach(code => {code.remove();})
|
||||
}"""
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user