From 68a0528db24cd7b252088259b3d1c7bfb7377fc3 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 18 Dec 2020 18:33:46 -0800 Subject: [PATCH] Declare supported color schemes in State that both dark and light color schemes are supported in the document to inform browsers before CSS is loaded and parsed. Also added a bunch of comments. --- themes/etch-custom/layouts/partials/head.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/themes/etch-custom/layouts/partials/head.html b/themes/etch-custom/layouts/partials/head.html index 9a18309..270657a 100644 --- a/themes/etch-custom/layouts/partials/head.html +++ b/themes/etch-custom/layouts/partials/head.html @@ -8,12 +8,13 @@ {{ printf `` $icon_192.RelPermalink | safeHTML }} {{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}} {{ printf `` $favicon.RelPermalink | safeHTML -}} - + {{ printf `` $icon_192.RelPermalink | safeHTML }} {{ $mask_icon := resources.Get "/mask_apple.svg" | resources.Fingerprint "md5" -}} {{ printf `` $mask_icon.RelPermalink | safeHTML }} + {{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.Fingerprint "md5" -}} {{ printf `` $webmanifest.RelPermalink | safeHTML }} @@ -28,8 +29,14 @@ {{ if not (eq $dark "off") -}} {{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}} {{ end -}} + + {{ $css := $resources | resources.Concat "css/style.css" | minify | resources.Fingerprint "sha384" -}} {{ printf `` $css.RelPermalink $css.Data.Integrity | safeHTML }} + {{ if .Params.highlight -}} {{ $css_syntax := resources.Get "/css/syntax.css" | minify | resources.Fingerprint "sha384" }} {{- printf `` $css_syntax.RelPermalink $css_syntax.Data.Integrity | safeHTML }} @@ -39,8 +46,8 @@ {{- else -}} {{ .Title }} - Seirdy {{- end -}} - + {{- if (eq "page" .Kind) }} @@ -48,6 +55,7 @@ {{- else }} {{- end }} + {{ $og_image := resources.Get "/open_graph.png" | resources.Fingerprint "md5" -}} {{ printf `` $og_image.Permalink | safeHTML }}