Skip to content

Commit

Permalink
docs: custom color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jan 4, 2024
1 parent afeb439 commit 07f8545
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
5 changes: 4 additions & 1 deletion docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ mjx-math {
}

:root {
--md-admonition-icon--important: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg>')
--md-primary-fg-color: #00599c;
--md-primary-fg-color--light: #659ad2;
--md-primary-fg-color--dark: #004482;
--md-admonition-icon--important: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg>');
}

.md-typeset .admonition.important,
Expand Down
23 changes: 16 additions & 7 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,27 @@ theme:
- toc.follow
- toc.integrate
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/link
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
primary: custom
toggle:
icon: material/weather-night
icon: material/weather-sunny
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: indigo
accent: indigo
primary: black
toggle:
icon: material/weather-sunny
name: Switch to light mode
icon: material/weather-night
name: Switch to system preference
font:
text: Roboto
code: Roboto Mono
Expand All @@ -65,6 +72,8 @@ plugins:
- search
- social:
enabled: !ENV [CI, false]
cards_layout_options:
background_color: "#00599c"
- tags:
tags_file: users_guide/examples/tags_index.md

Expand Down

0 comments on commit 07f8545

Please sign in to comment.