Skip to content

Commit 313ff3e

Browse files
stackhpc-ciAlex-Welsh
authored andcommitted
Add dark mode to docs
1 parent 5bcf052 commit 313ff3e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/source/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,25 @@
9898
# html_extra_path = ['_extra']
9999

100100
html_theme_options = {
101+
"palette": [
102+
103+
{
104+
"media": "(prefers-color-scheme: light)",
105+
"scheme": "default",
106+
"toggle": {
107+
"icon": "material/weather-sunny",
108+
"name": "Switch to dark mode",
109+
}
110+
},
111+
{
112+
"media": "(prefers-color-scheme: dark)",
113+
"scheme": "slate",
114+
"toggle": {
115+
"icon": "material/weather-night",
116+
"name": "Switch to system preference",
117+
}
118+
},
119+
],
101120
"features": [
102121
"navigation.expand",
103122
"navigation.top",

0 commit comments

Comments
 (0)