From a2ddf2b329392fd368d23648b23aaecfc6f05f7d Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Tue, 30 May 2023 11:45:06 +0000
Subject: [PATCH] use base theme for mermaid blocks

---
 layouts/partials/scripts/other.html |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/layouts/partials/scripts/other.html b/layouts/partials/scripts/other.html
index aaae52b..ee25a42 100644
--- a/layouts/partials/scripts/other.html
+++ b/layouts/partials/scripts/other.html
@@ -1,7 +1,13 @@
 
 {{ if in .Content "mermaid" }}
+<input type="checkbox" class="mermaid-theme">
 <script type="module">
   import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
-  mermaid.initialize({ startOnLoad: true, theme: 'dark' });
+
+  function initialize_mermaid(theme = 'base') {
+    mermaid.initialize({ startOnLoad: true, theme: theme });
+  }
+
+  initialize_mermaid();
 </script>
 {{ end }}
\ No newline at end of file

--
Gitblit v1.10.0