1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-24 17:52:11 +00:00
seirdy.one/layouts/shortcodes/indieweb-icon.html
Rohan Kumar 54acd64ccb
Back to SVG icon
I fixed the sizing issue with a viewbox attribute.
2022-06-20 22:57:09 -07:00

10 lines
494 B
HTML

{{ $favicon := resources.Get "/favicon.png" -}}
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
{{- if in site.BaseURL ".onion" -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
src="data:image/png;base64,{{ $favicon_base64 }}" />
{{- else -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
src="{{ $favicon_svg.RelPermalink }}" />
{{- end }}