diff --git a/config.toml b/config.toml index 2d0780b..a6274e3 100644 --- a/config.toml +++ b/config.toml @@ -133,10 +133,17 @@ language_name.ca = "Català" language_name.en = "English" language_name.es = "Español" -# Enable JavaScript theme toggler for dark/light mode (and automatic switching). -# The default setting is the light theme. +# Enable JavaScript theme toggler to allow users to switch between dark/light mode. +# Also enables automatic switching based on user's OS-level theme settings. +# If disabled, your site will only use the theme specified in the `default_theme` variable. theme_switcher = true +# This setting determines the default theme ("light" or "dark"). +# If you wish to use only a dark or light theme, disable the `theme_switcher` above and set this variable. +# If `theme_switcher` is enabled, this will be the theme that is visible to users who have JavaScript disabled. +# Defaults to "light", if unset. +default_theme = "light" + # Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript). copy_button = true diff --git a/templates/base.html b/templates/base.html index c2ecd32..12b773c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -9,7 +9,10 @@ {% import "macros/add_comments.html" as macros_add_comments %} - + + {% include "partials/header.html" %} diff --git a/theme.toml b/theme.toml index a24e4af..cd9eea5 100644 --- a/theme.toml +++ b/theme.toml @@ -26,10 +26,17 @@ language_name.ca = "Català" language_name.en = "English" language_name.es = "Español" -# Enable JavaScript theme toggler for dark/light mode (and automatic switching). -# The default setting is the light theme. +# Enable JavaScript theme toggler to allow users to switch between dark/light mode. +# Also enables automatic switching based on user's OS-level theme settings. +# If disabled, your site will only use the theme specified in the `default_theme` variable. theme_switcher = true +# This setting determines the default theme ("light" or "dark"). +# If you wish to use only a dark or light theme, disable the `theme_switcher` above and set this variable. +# If `theme_switcher` is enabled, this will be the theme that is visible to users who have JavaScript disabled. +# Defaults to "light", if unset. +default_theme = "light" + # Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript). copy_button = true