From 78a359fd78512912db05039f5768abf22a36e066 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Sun, 28 Jan 2024 16:29:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Add=20automatic=20light/dark=20t?= =?UTF-8?q?heme=20toggle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace light and dark toggle icons resp. with sun and moon+stars. Use system preferences. See: https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode --- mkdocs.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index c5f141ae0d2..acdf3ba0161 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,12 +17,19 @@ theme: logo: loop-logo.png favicon: loop-logo.png palette: + + # 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: default primary: custom toggle: - icon: material/brightness-7 + icon: material/weather-sunny name: Switch to dark mode # Palette toggle for dark mode @@ -30,8 +37,8 @@ theme: scheme: slate primary: custom toggle: - icon: material/brightness-4 - name: Switch to light mode + icon: material/weather-night + name: Switch to auto (use System Preferences) # repo_url: https://github.com/LoopKit/Loop