From 1bbd6283a694a1235a75ee11d5adc1a2a3657563 Mon Sep 17 00:00:00 2001 From: Miran Date: Fri, 10 Nov 2023 13:53:32 +0100 Subject: [PATCH] add dark theme for nimbus.guide (#5564) --- docs/the_nimbus_book/mkdocs.yml | 18 ++++++++++++++---- docs/the_nimbus_book/src/stylesheets/extra.css | 6 ++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 docs/the_nimbus_book/src/stylesheets/extra.css diff --git a/docs/the_nimbus_book/mkdocs.yml b/docs/the_nimbus_book/mkdocs.yml index 2b6abe5e8..952f0b298 100644 --- a/docs/the_nimbus_book/mkdocs.yml +++ b/docs/the_nimbus_book/mkdocs.yml @@ -16,9 +16,20 @@ theme: - navigation.top - content.tabs.link palette: - scheme: default - primary: orange - accent: amber + - scheme: default + primary: orange + 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 use_directory_urls: false @@ -29,7 +40,6 @@ docs_dir: src markdown_extensions: - admonition - - meta - pymdownx.details - pymdownx.highlight: anchor_linenums: true diff --git a/docs/the_nimbus_book/src/stylesheets/extra.css b/docs/the_nimbus_book/src/stylesheets/extra.css new file mode 100644 index 000000000..e49c731ca --- /dev/null +++ b/docs/the_nimbus_book/src/stylesheets/extra.css @@ -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); + }