Skip to content

Commit bc77241

Browse files
stackhpc-ciAlex-Welsh
authored andcommitted
Add dark mode to docs
1 parent fb9fd0f commit bc77241

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
@@ -97,6 +97,25 @@
9797
# html_extra_path = ['_extra']
9898

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

0 commit comments

Comments
 (0)