]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Add dark mode toggle for documentation (#2403)
authorMeder Kamalov <38204337+mederka@users.noreply.github.com>
Tue, 11 Oct 2022 10:54:24 +0000 (12:54 +0200)
committerGitHub <noreply@github.com>
Tue, 11 Oct 2022 10:54:24 +0000 (11:54 +0100)
mkdocs.yml

index 2a1d8e7757cbc261076b113de0163e3278725f55..42e6e95de65d5647b793cb4506ce6261083b477e 100644 (file)
@@ -4,6 +4,18 @@ site_url: https://www.python-httpx.org/
 
 theme:
     name: 'material'
+    palette:
+      - scheme: 'default'
+        media: '(prefers-color-scheme: light)'
+        toggle:
+          icon: 'material/lightbulb'
+          name: "Switch to dark mode"
+      - scheme: 'slate'
+        media: '(prefers-color-scheme: dark)'
+        primary: 'blue'
+        toggle:
+          icon: 'material/lightbulb-outline'
+          name: 'Switch to light mode'
     features:
         - navigation.sections