aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/function-fetch-favicons.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-11-21 19:42:16 -0500
committertdro <tdro@noreply.example.com>2022-11-21 19:42:16 -0500
commit964b79a957e9d0f193625940acbb10a8863d79b8 (patch)
tree074627359e3176599054483dc3919f0d0385ede6 /themes/default/layouts/partials/function-fetch-favicons.html
parent8113e9c39376d1e9fb1c239a678a7502272e8fda (diff)
downloadcanory-964b79a957e9d0f193625940acbb10a8863d79b8.tar.gz
canory-964b79a957e9d0f193625940acbb10a8863d79b8.tar.bz2
canory-964b79a957e9d0f193625940acbb10a8863d79b8.zip
themes/default/layouts/partials: Split favicon domain reference and fetch action into separate functions
To help with template reuse and analysis
Diffstat (limited to 'themes/default/layouts/partials/function-fetch-favicons.html')
-rw-r--r--themes/default/layouts/partials/function-fetch-favicons.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/function-fetch-favicons.html b/themes/default/layouts/partials/function-fetch-favicons.html
new file mode 100644
index 0000000..1d52c7e
--- /dev/null
+++ b/themes/default/layouts/partials/function-fetch-favicons.html
@@ -0,0 +1,13 @@
+{{- $source := .Source -}}
+{{- $infix := .Infix -}}
+
+{{- $output := partial "function-caches-images.html"
+ (dict
+ "Source" $source
+ "Fit" "160x160"
+ "Target" (print (partial "function-paths.html" "media") "/")
+ "Copy" (print (partial "function-paths.html" "media") "/favicon." $infix ".png")
+ )
+-}}
+
+{{- return $output -}}