From: Piotr Gnus Date: Sat, 18 Sep 2021 11:08:29 +0000 (+0200) Subject: Add dark theme for the documentation (#1230) X-Git-Tag: 0.17.0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a1108058b6c0a0ab634b4c4376cf878376bf124;p=thirdparty%2Fstarlette.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 --- diff --git a/mkdocs.yml b/mkdocs.yml index 048cf7fe..379f4cbc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,6 +5,18 @@ site_url: https://www.starlette.io theme: name: 'material' 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_url: https://github.com/encode/starlette