27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<span class="inline-svg">
|
|
|
|
{{ $dict := newScratch }}
|
|
|
|
|
|
{{ if (eq .iconName "docs")}}
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-doc" width="24" height="24"
|
|
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
|
stroke-linejoin="round">
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
|
<path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" />
|
|
<path d="M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z" />
|
|
<path d="M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" />
|
|
<path d="M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5z" />
|
|
</svg>
|
|
{{ else }}
|
|
{{ if (eq .custom true) }}
|
|
{{ $dict.Set "svg" (readFile (print "static/tabler-icons/" .iconName ".svg")) }}
|
|
{{ else }}
|
|
{{ $dict.Set "svg" (partial (print "tabler-icons/" .iconName ".svg")) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ $dict.Get "svg" | safeHTML }}
|
|
|
|
</span> |