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