Skip to content

Commit

Permalink
feat(docs): add toggle for light/dark mode support
Browse files Browse the repository at this point in the history
  • Loading branch information
moshevayner committed Nov 19, 2024
1 parent 78b2b87 commit 2b1d197
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,28 @@ theme:
logo: 'material/cloud-outline'
favicon: 'img/logo-notext.svg'
palette:
primary: 'teal'
accent: 'green'
# 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
primary: 'teal'
accent: 'green'
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: Match OS theme (Automatic)

plugins:
- search
- macros:
Expand Down

0 comments on commit 2b1d197

Please sign in to comment.