From e79fd2e81c072fcdce435f1d3ef277cacfbfc4eb Mon Sep 17 00:00:00 2001 From: Philip Metzger Date: Tue, 2 Jan 2024 22:14:57 +0100 Subject: [PATCH] docs: Make the website's theme adjustable. The website will also adjust to the system default theme now. I mostly did this because I am a darkkmode user and we didn't provide it yet. --- mkdocs.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 281ff9ca16..edc70dc684 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,6 +8,26 @@ theme: language: 'en' features: # - navigation.top + + # Respect the users default settings and add a toggle for manually choosing + # automatic/light/dark palette. + # taken from https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#system-preference + palette: + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to system preference + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to light mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to dark mode + extra: version: provider: mike