layouts/shortcodes/mermaid.html: choosing <div> for styling flexibility

Enhance styling and centering by opting for `<div>` over `<p>`. For example, utilize the class `div.mermaid` with `text-align: center;` for positioning the Mermaid.js SVG image at the center of the container.
This commit is contained in:
Enzo Venturi 2023-10-30 06:42:08 +00:00 committed by GitHub
parent 3f1bcccbfb
commit a9cf9615a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,6 @@
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}
<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
<div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
{{- .Inner -}}
</p>
</div>