add dark theme for nimbus.guide (#5564)

This commit is contained in:
Miran 2023-11-10 13:53:32 +01:00 committed by GitHub
parent f388d76e49
commit 1bbd6283a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View File

@ -16,9 +16,20 @@ theme:
- navigation.top - navigation.top
- content.tabs.link - content.tabs.link
palette: palette:
scheme: default - scheme: default
primary: orange primary: orange
accent: amber accent: amber
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: black
accent: light blue
toggle:
icon: material/brightness-4
name: Switch to light mode
extra_css:
- stylesheets/extra.css
# Support urls previously used by mdbook # Support urls previously used by mdbook
use_directory_urls: false use_directory_urls: false
@ -29,7 +40,6 @@ docs_dir: src
markdown_extensions: markdown_extensions:
- admonition - admonition
- meta
- pymdownx.details - pymdownx.details
- pymdownx.highlight: - pymdownx.highlight:
anchor_linenums: true anchor_linenums: true

View File

@ -0,0 +1,6 @@
[data-md-color-scheme="slate"] {
--md-hue: 180;
--md-default-bg-color: hsla(var(--md-hue), 0%, 0%, 1);
--md-footer-bg-color: hsla(var(--md-hue), 0%, 0%, 1);
--md-footer-bg-color--dark: hsla(var(--md-hue), 0%, 0%, 1);
}