diff --git a/assets/css/custom.css b/assets/css/custom.css index 2f245c1..197bba7 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -286,3 +286,9 @@ blockquote.alert-warning { font-style: italic; font-size: 0.9rem; } + +/* background color of mermaid diagrams */ +.content pre.mermaid{ + color: var(--code-block-color); + background-color: var(--bkg-color) !important; +} diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..5d44d83 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +
+  {{ .Inner | htmlEscape | safeHTML }}
+
+{{ .Page.Store.Set "hasMermaid" true }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..1da439c --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,18 @@ +{{ partial "head/head.html" . }} + +
+ {{ partial "sidebar/sidebar.html" . }} +
+ {{ block "main" . -}}{{- end }} +
+ {{ block "sidebar" . }}{{ end }} +
+ + {{ if .Store.Get "hasMermaid" }} + + {{ end }} + +