pre-commit formatter

This commit is contained in:
Junyi Hou 2024-04-09 20:03:09 +08:00
parent ddec81c876
commit a1cd164e9a
117 changed files with 153 additions and 170 deletions

View file

@ -21,7 +21,7 @@
</div>
</article>
{{ if gt .Site.Params.readNextPosts 0 }}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }}
{{ with $related }}
@ -41,15 +41,15 @@
{{ if not .Params.disableComments }}
{{ partial "comments.html" . }}
{{ end }}
{{/* When you use ```mermaid``, render-codeblock-mermaid.html is called and
{{/* When you use ```mermaid``, render-codeblock-mermaid.html is called and
`.Store.Set "hasMermaid"` is executed.
`.Store.Get "hasMermaid"` will return true and mermaid.js will be loaded.
*/}}
{{ if .Store.Get "hasMermaid" }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }}
{{ $colorTheme := "light" }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }}
@ -66,7 +66,7 @@
}
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
window.mermaid = mermaid;
window.initMermaid()
@ -74,4 +74,3 @@
</script>
{{ end }}
{{ end }}