Commit a3003e2
authored
Persist light theme on refresh (#513)
Fixes
- #414
... using the workaround suggested in
-
just-the-docs/just-the-docs#1223 (comment).
Worth spending a bit of thought on whether we want more lines of my
hacky JS code saving the theme to local storage, which we potentially
can't delete until
[jtd/#1223](just-the-docs/just-the-docs#1223)
is solved nicely upstream.
### Question:
Is it worth switching build system to something that supports theme
toggling and inferring theme from the browser/os settings? It feels like
it's the responsibility of the doc engine/doc theme. E.g. [Material for
MkDocs supports
it](https://github.com/UCL-ARC/mkdocs-rc-docs/blob/140e8fe5eef0379997af1b2eaaf396786bc006b8/mkdocs-project-dir/mkdocs.yml#L28).
That said, if you're happy with these lines, I am.1 parent bfee697 commit a3003e2
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
| |||
0 commit comments