Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(docs): add toggle for light/dark mode support #16951

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

moshevayner
Copy link
Member

@moshevayner moshevayner commented Nov 19, 2024

What this PR does / why we need it:
This adds a long-overdue toggle for dark mode support in our docs website. The website will automatically align with the OS theme (light/dark), but it's possible to toggle dark mode on/off by using the switch.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Special notes for your reviewer:
Followed mkdocs insturctions here

Netlify Preview deploy here

And also screenshots below.

Light Mode Screenshot (Same as before):
image

Dark Mode Screenshot:
image

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 19, 2024
@rifelpet
Copy link
Member

Very cool! Looking at the docs I see we can add a media selector to default to the operating system's light/dark preference:

https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode

Any chance you can add that here as well?

@moshevayner
Copy link
Member Author

moshevayner commented Nov 19, 2024

Very cool! Looking at the docs I see we can add a media selector to default to the operating system's light/dark preference:

https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode

Any chance you can add that here as well?

Sure thing!
That's a great catch. Thanks for finding that!

UPDATE: DONE!

@moshevayner
Copy link
Member Author

/retest

1 similar comment
@moshevayner
Copy link
Member Author

/retest

@hakman
Copy link
Member

hakman commented Nov 19, 2024

Thanks @moshevayner! :smiling
/lgtm
/assign @rifelpet

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2024
@k8s-ci-robot k8s-ci-robot merged commit 05a6517 into kubernetes:master Nov 20, 2024
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone Nov 20, 2024
@moshevayner moshevayner deleted the docs-site-dark-mode branch November 20, 2024 01:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants