From 9556c6ca2d7e587b0977649526f14c80fc4bb76d Mon Sep 17 00:00:00 2001 From: Markus Bilz Date: Sat, 13 Jan 2024 20:59:12 +0100 Subject: [PATCH] feat(doc): add light/dark mode to documentation --- mkdocs.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index c88efde..39301e1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,9 +7,45 @@ theme: logo: img/logo.png favicon: img/favicon.ico name: material + darkMode: true palette: - primary: black - accent: indigo + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + primary: black + accent: indigo + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + primary: black + accent: indigo + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to system preference + primary: black + accent: indigo + # - media: "(prefers-color-scheme: light)" + # scheme: default + # primary: black + # accent: indigo + # toggle: + # icon: material/toggle-switch-off-outline + # name: Switch to dark mode + # - media: "(prefers-color-scheme: dark)" + # scheme: slate + # primary: black + # accent: indigo + # toggle: + # icon: material/toggle-switch + # name: Switch to light mode icon: repo: fontawesome/brands/github edit: material/pencil