Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): Add dark theme #1422

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/images/cncf-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
5 changes: 4 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ This can make it a good fit for lightweight CI/CD use cases.

`ko` is a Cloud Native Computing Foundation Sandbox project.

<a href="https://cncf.io"><img width=300 src="./images/cncf.svg" alt="CNCF logo" /></a>
<a href="https://cncf.io">
<img width=300 src="./images/cncf-light.svg#only-light" alt="CNCF logo" />
<img width=300 src="./images/cncf-dark.svg#only-dark" alt="CNCF logo" />
</a>
21 changes: 20 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ theme:
favicon: images/favicon-96x96.png
custom_dir: docs/custom/
palette:
primary: light blue
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
primary: light blue
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: light blue
toggle:
icon: material/brightness-4
name: Switch to system preference

nav:
- index.md
Expand Down
Loading