From 1803987555cbbe0aea1ab673907192e734a55425 Mon Sep 17 00:00:00 2001 From: welpo Date: Sat, 15 Apr 2023 00:42:27 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20make=20JS=20light/dark=20to?= =?UTF-8?q?ggle=20optional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 5 +++++ templates/partials/nav.html | 2 ++ 2 files changed, 7 insertions(+) diff --git a/config.toml b/config.toml index a7b4b65..c97f0a7 100644 --- a/config.toml +++ b/config.toml @@ -16,6 +16,11 @@ highlight_code = true highlight_theme = "css" [extra] + +# Enable JavaScript theme toggler for dark/light mode (and automatic switching). +# The default setting is the light theme. +theme_switcher = true + # Date format used when listing posts (main page, /blog section, tag posts list…) # Default is "6th July 2049". long_date_format = "%d %B %Y" diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 78a695a..33418bb 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -12,12 +12,14 @@ }} {% endfor %} + {%- if config.extra.theme_switcher == true -%} {% endif %}