2022-05-23 16:54:27 +00:00
|
|
|
{{ $mermaidData := dict "theme" "default" }}
|
|
|
|
{{ $data := dict "code" .Inner "mermaid" $mermaidData }}
|
2023-12-10 00:09:25 +00:00
|
|
|
{{ $imgsrc := "https://mermain.ink/img/{{ $data | jsonify | base64Encode }}"}}
|
2022-05-23 16:54:27 +00:00
|
|
|
|
|
|
|
<figure class="mermaid">
|
2023-12-10 00:09:25 +00:00
|
|
|
<img src="{{ $imgsrc }}" referrerpolicy="no-referrer" style="object-fit: scale-down;"
|
|
|
|
{{ if .Get "width" }}width='{{ .Get "width" }}' {{ end }}
|
|
|
|
{{ if .Get "height" }}height='{{ .Get "height" }}' {{ end }}
|
|
|
|
>
|
2022-05-23 16:54:27 +00:00
|
|
|
<figcaption class="text-center">
|
|
|
|
<small>{{ .Get "caption" }}</small>
|
|
|
|
</figcaption>
|
|
|
|
</figure>
|