From 4e30ae95eaf52a7f427bdf020d118f40e00ab291 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 9 Oct 2023 13:41:04 -0400 Subject: add some homemade svg, wpartials, and darkmode --- layouts/partials/func/GetSvg.html | 5 +++++ layouts/partials/head.html | 4 ++-- layouts/partials/scripts.html | 3 ++- layouts/partials/site-actions.html | 12 ++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 layouts/partials/func/GetSvg.html create mode 100644 layouts/partials/site-actions.html (limited to 'layouts/partials') diff --git a/layouts/partials/func/GetSvg.html b/layouts/partials/func/GetSvg.html new file mode 100644 index 0000000..bff1fd1 --- /dev/null +++ b/layouts/partials/func/GetSvg.html @@ -0,0 +1,5 @@ +{{ $resource := dict }} +{{ with resources.Get . | minify }} + {{ $resource = .Content | safeHTML }} +{{ end }} +{{ return $resource }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2106ef3..d7b2381 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,8 @@ {{ .Title }} - + {{ end }} {{ with resources.Get "css/main.css" }} {{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 152c32b..f7c95bd 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,4 +1,5 @@ {{ $scripts := resources.Match "js/*.js" }} {{ range $script := $scripts }} + {{ $script := $script | minify | fingerprint }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/site-actions.html b/layouts/partials/site-actions.html new file mode 100644 index 0000000..b9afa66 --- /dev/null +++ b/layouts/partials/site-actions.html @@ -0,0 +1,12 @@ +
+ + +
\ No newline at end of file -- cgit v1.1