From fd38eb83d3f1b4219246eb33362dfb78b3ee687d Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Mon, 10 Jul 2023 15:08:59 +0200 Subject: [PATCH] Add a button to switch between light and dark theme --- mkdocs.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 698aa4d..ddf841b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -42,8 +42,23 @@ nav: theme: name: material font: false - palette: - primary: black + + palette: + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: black + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + toggle: + icon: material/brightness-4 + name: Switch to light mode + logo: images/invidious.png # https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#logo favicon: images/favicon.ico # https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#favicon features: