mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-04-27 06:06:20 +02:00
feat(hook): add code block hook goat
This commit is contained in:
parent
859f574511
commit
c726bafc35
1 changed files with 16 additions and 0 deletions
16
layouts/_default/_markup/render-codeblock-goat.html
Normal file
16
layouts/_default/_markup/render-codeblock-goat.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ $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="Menlo,Lucida Console,monospace"
|
||||
{{ if or $width $height }}
|
||||
{{ with $width }} width="{{ . }}"{{ end }}
|
||||
{{ with $height }} height="{{ . }}"{{ end }}
|
||||
{{ else }}
|
||||
viewBox="0 0 {{ .Width }} {{ .Height }}"
|
||||
{{ end }}>
|
||||
{{ .Inner }}
|
||||
</svg>
|
||||
{{ end }}
|
||||
</div>
|
Loading…
Add table
Reference in a new issue