diff options
Diffstat (limited to 'themes/default/layouts/_default/_markup/render-codeblock-goat.html')
-rw-r--r-- | themes/default/layouts/_default/_markup/render-codeblock-goat.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/_markup/render-codeblock-goat.html b/themes/default/layouts/_default/_markup/render-codeblock-goat.html new file mode 100644 index 0000000..e83d7de --- /dev/null +++ b/themes/default/layouts/_default/_markup/render-codeblock-goat.html @@ -0,0 +1,19 @@ +{{ $width := .Attributes.width }} +{{ $height := .Attributes.height }} +{{ $caption := default "GoAT Diagram" .Attributes.caption }} + +<diagram-container> + {{ with diagrams.Goat .Inner }} + <svg + xmlns="http://www.w3.org/2000/svg" + {{ if or $width $height }} + {{ with $width }}width="{{ . }}"{{ end }} + {{ with $height }}height="{{ . }}"{{ end }} + {{ else }} + viewBox="0 0 {{ .Width }} {{ .Height }}" + {{ end }}> + {{ .Inner }} + </svg> + {{ end }} + <figcaption>{{ $caption | markdownify }}</figcaption> +</diagram-container> |