From 113a7f4e5d4efd87646f8c26f81b7754ea7f41e2 Mon Sep 17 00:00:00 2001 From: welpo Date: Thu, 3 Aug 2023 00:12:00 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(theme-switcher):=20hide=20butt?= =?UTF-8?q?on=20if=20JS=20is=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/no_js.css | 1 + templates/partials/header.html | 2 ++ templates/partials/nav.html | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 static/no_js.css diff --git a/static/no_js.css b/static/no_js.css new file mode 100644 index 0000000..0294a30 --- /dev/null +++ b/static/no_js.css @@ -0,0 +1 @@ +.js{display:none} diff --git a/templates/partials/header.html b/templates/partials/header.html index 8caef82..81eddcf 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -110,6 +110,8 @@ {%- endif -%}"> {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} + {# If JavaScript is disabled, hide the button. #} + {%- endif -%} diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 4c98be9..a554d28 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -64,7 +64,7 @@ {# Theme switcher #} {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} -
  • +
  • {%- endif -%}