From 261c18da9126e534bf68242d1cb75fcba6cd42cb Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Tue, 6 Sep 2022 19:30:37 +0200 Subject: [PATCH] Add dark mode toggle to documentation --- docs/mkdocs/mkdocs.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/mkdocs/mkdocs.yml b/docs/mkdocs/mkdocs.yml index 823a59beae..f292220338 100644 --- a/docs/mkdocs/mkdocs.yml +++ b/docs/mkdocs/mkdocs.yml @@ -16,8 +16,21 @@ theme: name: material language: en palette: - primary: indigo - accent: indigo + - media: '(prefers-color-scheme: light)' + scheme: default + primary: indigo + accent: indigo + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: '(prefers-color-scheme: dark)' + scheme: slate + primary: indigo + accent: indigo + toggle: + icon: material/brightness-4 + name: Switch to light mode + font: text: Roboto code: JetBrains Mono