mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2024-11-13 23:37:16 +00:00
14 lines
547 B
HTML
14 lines
547 B
HTML
{{ $mermaidData := dict "theme" "default" }}
|
|
{{ $data := dict "code" .Inner "mermaid" $mermaidData }}
|
|
{{ $imgsrc := "https://mermain.ink/img/{{ $data | jsonify | base64Encode }}"}}
|
|
|
|
<figure class="mermaid">
|
|
<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 }}
|
|
>
|
|
<figcaption class="text-center">
|
|
<small>{{ .Get "caption" }}</small>
|
|
</figcaption>
|
|
</figure>
|