mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2024-11-09 21:49:41 +00:00
Update mermaid shortcode
This commit is contained in:
parent
4c212e8f64
commit
8d6976467a
|
@ -1,8 +1,12 @@
|
|||
{{ $mermaidData := dict "theme" "default" }}
|
||||
{{ $data := dict "code" .Inner "mermaid" $mermaidData }}
|
||||
{{ $imgsrc := "https://mermain.ink/img/{{ $data | jsonify | base64Encode }}"}}
|
||||
|
||||
<figure class="mermaid">
|
||||
<img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer">
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue