From 71b5c16e7f5e60fb87a31562e88360d9876c5ac3 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 18 Sep 2023 21:15:53 +0200 Subject: [PATCH] feat: enable dark mode auto switch without reloading --- layouts/partials/head.html | 34 +++++++++++++++++++++++++++++++++- layouts/partials/header.html | 8 -------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 35257fc7..a4a02878 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -119,6 +119,38 @@ {{ end -}} +{{- /* theme-toggle is disabled and theme is auto */}} +{{- if (and site.Params.disableThemeToggle (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }} + +{{- end }} +