Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render-codeblock-goat.html « _markup « _default « layouts « docs - github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1e57e94a7b30e9712fa3b4a6f21e697ffa7bf9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{{ $width := .Attributes.width }}
{{ $height := .Attributes.height }}
{{ $class := .Attributes.class | default "" }}
<div class="goat svg-container {{ $class }}">
  {{ with diagrams.Goat .Code }}
    <svg
      xmlns="http://www.w3.org/2000/svg"
      font-family="Menlo,Lucida Console,monospace"
      {{ if or $width $height }}
        {{ with $width }}width="{{ . }}"{{ end }}
        {{ with $height }}height="{{ . }}"{{ end }}
      {{ else }}
        viewBox="0 0 {{ .Width }} {{ .Height }}"
      {{ end }}>
      {{ .Body }}
    </svg>
  {{ end }}
</div>