From cbed11c67787d87dfb628e3246e3825d15158008 Mon Sep 17 00:00:00 2001 From: boldsuck Date: Tue, 10 Dec 2024 23:31:03 +0100 Subject: [PATCH] Add automatic light / dark mode --- mkdocs.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 9f6cf62..4e59443 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,20 +9,29 @@ theme: favicon: 'resources/img/favicon.ico' features: - navigation.instant - - navigation.tracking - navigation.sections - - toc.follow - - navigation.top - navigation.tabs - navigation.tabs.sticky - - search.suggest + - navigation.top + - navigation.tracking - search.highlight + - search.suggest + - toc.follow palette: - - scheme: youtube # Palette toggle for light mode + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: youtube toggle: icon: material/weather-night name: Switch to dark mode - - scheme: slate # Palette toggle for dark mode + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate toggle: icon: material/weather-sunny name: Switch to light mode