mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 01:32:11 +00:00
dcbace64a3
This fixes the logic to use PNGs instead of SVGs for the hidden service.
11 lines
558 B
HTML
11 lines
558 B
HTML
{{ $favicon := resources.Get "/favicon.png" -}}
|
|
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
|
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
|
|
{{- $favicon_bigpng := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
|
|
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
|
|
{{ if in site.BaseURL ".onion" -}}
|
|
src="data:image/png;base64,{{ $favicon_base64 }}" srcset="{{ $favicon_bigpng.RelPermalink }} 2x"
|
|
{{- else -}}
|
|
src="{{ $favicon_svg.RelPermalink }}"
|
|
{{- end -}}
|
|
>
|