fix mermaid

This commit is contained in:
Mivinci 2022-11-09 18:03:38 +08:00
parent 1105d5e939
commit 88481e9f0b
15 changed files with 59 additions and 47 deletions

View file

@ -1,12 +1,12 @@
<div>
<div class="flex justify-between">
<div class="flex justify-between items-start">
{{ if .Page.Params.link }}
<a class="text-lg font-bold" href="{{ .Page.Params.link }}">{{ .Title }}</a>
{{ else }}
<a class="text-lg font-bold" href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ end }}
{{ if .Site.Params.displayDate }}
<div class="text-sm font-bold">{{ .Date | time.Format (T "timeformat") }}</div>
<div class="text-sm font-bold whitespace-nowrap">{{ .Date | time.Format (T "timeformat") }}</div>
{{ end }}
</div>
{{ if .Site.Params.displayDescription }}

View file

@ -3,5 +3,5 @@
crossorigin="anonymous">
</script>
<script>
mermaid.init({theme: 'dark'}, 'code.language-mermaid')
mermaid.init(undefined, 'code.language-mermaid')
</script>

View file

@ -1,5 +1,9 @@
<script>
window.minima_theme = localStorage.getItem('theme')
</script>
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ partial "katex.html" . }}
{{ end }}
{{ if or .Params.mermaid .Site.Params.mermaid }}