Skip to content

Commit

Permalink
Merge pull request #45 from salim-b/tweak-goat
Browse files Browse the repository at this point in the history
Use proper font in GoAT diagrams
  • Loading branch information
h-enk committed Sep 7, 2023
2 parents dc3e24e + 7f3232d commit 2e9901c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions layouts/_default/_markup/render-codeblock-goat.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ $width := .Attributes.width }}
{{ $height := .Attributes.height }}
{{ $class := .Attributes.class | default "" }}
<div class="goat svg-container {{ $class }}">
{{ with diagrams.Goat .Inner }}
<svg
xmlns="http://www.w3.org/2000/svg"
font-family="'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'"
{{ if or $width $height }}
{{ with $width }}width="{{ . }}"{{ end }}
{{ with $height }}height="{{ . }}"{{ end }}
{{ else }}
viewBox="0 0 {{ .Width }} {{ .Height }}"
{{ end }}>
{{ .Inner }}
</svg>
{{ end }}
</div>

0 comments on commit 2e9901c

Please sign in to comment.