25 lines
707 B
HTML
25 lines
707 B
HTML
{{ $width := .Attributes.width }}
|
|
{{ $height := .Attributes.height }}
|
|
{{ $class := .Attributes.class | default "" }}
|
|
<figure>
|
|
<div class="goat svg-container {{ $class }}">
|
|
{{ 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 }}
|
|
width="{{ .Width }}"
|
|
height="{{ .Height }}"
|
|
viewBox="0 0 {{ .Width }} {{ .Height }}"
|
|
{{ end }}>
|
|
{{ .Inner }}
|
|
</svg>
|
|
{{ end }}
|
|
</div>
|
|
{{ with .Attributes.caption }}
|
|
<figcaption>{{ . }}</figcaption>
|
|
{{ end }}
|
|
</figure>
|