hexo-theme-stellar/layout/_partial/plugins/parser/mermaid/script.ejs

29 lines
664 B
Plaintext
Executable File

<script type="text/javascript" src="<%- theme.plugins.mermaid.js %>"></script>
<script>
var mermaid_config = {
startOnLoad: true,
theme:
"<%- theme.style.darkmode %>" == "auto" &&
window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "<%- theme.plugins.mermaid.theme %>",
logLevel: 3,
themeVariables: {
darkMode: true
},
flowchart: {
useMaxWidth: false,
htmlLabels: true,
curve: "linear"
},
gantt: {
axisFormat: "%Y/%m/%d"
},
sequence: {
actorMargin: 50
}
}
if (window.mermaid) {
mermaid.initialize(mermaid_config);
}
</script>