From ed270bc915abbd822874ba7b9fc7e90242ac24a3 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 24 Jun 2024 19:21:46 -0700 Subject: [PATCH] Hide checkboxes and icons when no CSS in head is loaded This seems to help in Firefox's reader mode. Also adjust images to not be huge without CSS. Signed-off-by: Danila Fedorin --- layouts/partials/head.html | 4 ++-- layouts/partials/icon.html | 2 +- layouts/shortcodes/sidenote.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ebfb509..9b42c8d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -30,8 +30,8 @@ {{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }} {{ $code := resources.Get "scss/code.scss" | resources.ToCSS | resources.Minify }} {{ $icon := resources.Get "img/favicon.png" }} - - + + {{ partial "defercss.html" (dict "url" $sidenotes.Permalink "extra" "") }} {{ partial "defercss.html" (dict "url" $code.Permalink "extra" "") }} diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index fdf701c..98a9d26 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,4 +1,4 @@ - + {{- /* This comment is to remove trailing whitespace */ -}} diff --git a/layouts/shortcodes/sidenote.html b/layouts/shortcodes/sidenote.html index e488f9c..445b59e 100644 --- a/layouts/shortcodes/sidenote.html +++ b/layouts/shortcodes/sidenote.html @@ -1,6 +1,6 @@ - + {{- if $offset := .Get 3 -}} {{- else -}}