1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-26 02:22:09 +00:00
seirdy.one/layouts/partials/indieweb-icon.html
Rohan Kumar bf8aadf8bb
Update for Hugo 0.123
- Stop using symlinks for template files, since those seem to have
  broken.
- Force int data type for scratchpad integers since type inference seems
  to have changed.
2024-01-30 17:44:23 -05:00

10 lines
461 B
HTML

{{- $src := "" -}}
{{- if in site.BaseURL ".onion" -}}
{{- $favicon := resources.Get "/favicon.png" -}}
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
{{- $src = printf "data:image/png;base64,%s" $favicon_base64 -}}
{{- else -}}
{{- with (partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg") -}}
{{- $src = .Permalink -}}
{{- end -}}{{- end -}}
<img itemprop="image" width="16" height="16" alt="" src="{{ $src }}" class="u-photo photo" />