aboutsummaryrefslogtreecommitdiff
path: root/themes/opulene/layouts/_default/_markup/render-codeblock-goat.html
blob: 7176c2b0c0e030240cedab7864b3e702830bcc6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{ $width   := .Attributes.width   }}
{{ $height  := .Attributes.height  }}
{{ $caption := .Attributes.caption }}
{{ $caption := default "GoAT Diagram" .Attributes.caption }}
<diagram-container>
  {{ with diagrams.Goat .Inner }}
    <svg font-family="'Fira Code', 'Lucida Console', 'Andale Mono', monospace"
      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 }}</figcaption>
</diagram-container>