mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Fix onion site u-photo
Switch away from inline images; they cause more problems than they're worth.
This commit is contained in:
parent
d3081ddc8a
commit
0b1a504b65
2 changed files with 12 additions and 18 deletions
|
@ -1,10 +1,7 @@
|
||||||
{{- $src := "" -}}
|
{{ $favicon := "/favicon.svg" -}}
|
||||||
{{- if in site.BaseURL ".onion" -}}
|
{{- if in site.BaseURL ".onion" -}}
|
||||||
{{- $favicon := resources.Get "/favicon.png" -}}
|
{{- $favicon = "/favicon.png" -}}
|
||||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
{{- end -}}
|
||||||
{{- $src = printf "data:image/png;base64,%s" $favicon_base64 -}}
|
{{- with (partialCached "cache-bust.html" "/favicon.png" "/favicon.png") -}}
|
||||||
{{- else -}}
|
<img itemprop="image" width="16" height="16" alt="" src="{{ .Permalink }}" class="u-photo photo" />
|
||||||
{{- with (partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg") -}}
|
{{- end -}}
|
||||||
{{- $src = .Permalink -}}
|
|
||||||
{{- end -}}{{- end -}}
|
|
||||||
<img itemprop="image" width="16" height="16" alt="" src="{{ $src }}" class="u-photo photo" />
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{{- $src := "" -}}
|
{{ $favicon := "/favicon.svg" -}}
|
||||||
{{- if in site.BaseURL ".onion" -}}
|
{{- if in site.BaseURL ".onion" -}}
|
||||||
{{- $favicon := resources.Get "/favicon.png" -}}
|
{{- $favicon = "/favicon.png" -}}
|
||||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
{{- end -}}
|
||||||
{{- $src = printf "data:image/png;base64,%s" $favicon_base64 -}}
|
{{- with (partialCached "cache-bust.html" "/favicon.png" "/favicon.png") -}}
|
||||||
{{- else -}}
|
<img itemprop="image" width="16" height="16" alt="" src="{{ .Permalink }}" class="u-photo photo" />
|
||||||
{{- with (partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg") -}}
|
{{- end -}}
|
||||||
{{- $src = .Permalink -}}
|
|
||||||
{{- end -}}{{- end -}}
|
|
||||||
<img itemprop="image" width="16" height="16" alt="" src="{{ $src }}" class="u-photo photo" />
|
|
||||||
|
|
Loading…
Reference in a new issue