mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
bd705cd0b1
This should improve compatibility with older and non-mainstream browsers.
14 lines
684 B
HTML
14 lines
684 B
HTML
{{ $favicon := resources.Get "/favicon.png" -}}
|
|
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
|
{{- $favicon_bigpng := resources.Get "/favicon192.png" | resources.Fingerprint "md5" -}}
|
|
{{- $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 -}}
|
|
<picture itemprop="image">
|
|
<source srcset="{{ $favicon_svg.RelPermalink }}" type="image/svg+xml" />
|
|
<img class="u-photo photo" width="16" height="16" alt=""
|
|
src="{{ $favicon_bigpng.RelPermalink }}" />
|
|
</picture>
|
|
{{- end -}}
|