From 415d5ccad4d16aaf2ca267c21f762bf62b612ca4 Mon Sep 17 00:00:00 2001 From: Saianeesh Keshav Haridas Date: Fri, 15 Nov 2024 18:26:53 -0500 Subject: [PATCH] docs: add dark mode toggle --- mkdocs.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mkdocs.yaml b/mkdocs.yaml index aa315ce..a45ab6a 100644 --- a/mkdocs.yaml +++ b/mkdocs.yaml @@ -1,6 +1,25 @@ site_name: LAT_Alignment site_url: https://simonsobs.github.io/LAT_Alignment/ -theme: material +theme: + name: material + 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 + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to system preference plugins: - search - mkdocs-homepage-copier