From 0b1a504b65ae5745cf4866f9e1e256214a08374c Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 18 Mar 2024 18:09:15 -0400 Subject: [PATCH] Fix onion site u-photo Switch away from inline images; they cause more problems than they're worth. --- layouts/partials/indieweb-icon.html | 15 ++++++--------- layouts/shortcodes/indieweb-icon.html | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/layouts/partials/indieweb-icon.html b/layouts/partials/indieweb-icon.html index 72ebf74..dc97f41 100644 --- a/layouts/partials/indieweb-icon.html +++ b/layouts/partials/indieweb-icon.html @@ -1,10 +1,7 @@ -{{- $src := "" -}} +{{ $favicon := "/favicon.svg" -}} {{- 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 -}} - + {{- $favicon = "/favicon.png" -}} +{{- end -}} +{{- with (partialCached "cache-bust.html" "/favicon.png" "/favicon.png") -}} + +{{- end -}} diff --git a/layouts/shortcodes/indieweb-icon.html b/layouts/shortcodes/indieweb-icon.html index 72ebf74..dc97f41 100644 --- a/layouts/shortcodes/indieweb-icon.html +++ b/layouts/shortcodes/indieweb-icon.html @@ -1,10 +1,7 @@ -{{- $src := "" -}} +{{ $favicon := "/favicon.svg" -}} {{- 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 -}} - + {{- $favicon = "/favicon.png" -}} +{{- end -}} +{{- with (partialCached "cache-bust.html" "/favicon.png" "/favicon.png") -}} + +{{- end -}}