mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
* Bump mermaid to 11.3.0 * Mermaid theme changes based on mdbook theme * Replace old use cases diagram with mermaid one * Change out ASCII git art with mermaid git graph * Remove old theme.css file from book
13 lines
487 B
JavaScript
13 lines
487 B
JavaScript
//* Changes mermaid theme based on selected mdbook theme
|
|
const rootElement = document.documentElement;
|
|
const darkThemes = ["coal", "navy", "ayu"];
|
|
// Get the intersection of the HTML element class list & mdbook's dark themes
|
|
const selectedDarkTheme = [...rootElement.classList].filter((c) => darkThemes.includes(c));
|
|
|
|
if (selectedDarkTheme.length > 0) {
|
|
mermaid.initialize({ startOnLoad: true, theme: "dark" });
|
|
} else {
|
|
mermaid.initialize({ startOnLoad: true, theme: "default" });
|
|
}
|
|
|