mirror of https://github.com/encode/starlette.git
Add dark theme for the documentation (#1230)
* mkdocs: expanded theme configuration to add alternative dark theme. The default theme will be determined by the users system theme by the `prefers-color-scheme` media query. Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
48dea4ddf1
commit
7a1108058b
12
mkdocs.yml
12
mkdocs.yml
|
@ -5,6 +5,18 @@ site_url: https://www.starlette.io
|
||||||
theme:
|
theme:
|
||||||
name: 'material'
|
name: 'material'
|
||||||
custom_dir: docs/overrides
|
custom_dir: docs/overrides
|
||||||
|
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'
|
||||||
|
|
||||||
repo_name: encode/starlette
|
repo_name: encode/starlette
|
||||||
repo_url: https://github.com/encode/starlette
|
repo_url: https://github.com/encode/starlette
|
||||||
|
|
Loading…
Reference in New Issue