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

add button to toggle dark/light mode #337

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

xrstf
Copy link
Contributor

@xrstf xrstf commented Sep 17, 2023

This adds a simple button to the page to toggle between a light and dark mode. The dark mode is based on Bootstrap colors:

2023-09-17T13-59-48

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 17, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 17, 2023
@tengqm
Copy link
Contributor

tengqm commented Sep 17, 2023

This is nice.
Maybe we can add this to the k8s.io/docs website as well?

@tengqm
Copy link
Contributor

tengqm commented Sep 17, 2023

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm, xrstf

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 Sep 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4148fb7 into kubernetes-sigs:master Sep 17, 2023
@xrstf
Copy link
Contributor Author

xrstf commented Sep 17, 2023

For the Kubernetes website it might make sense to wait for it to use Bootstrap 5, which has better native support for it. This implementation here that I made is quite cheap, for the full website we probabl want something more robust/fine-tuned. But that's beyond my capabilities :-)

@sftim
Copy link
Contributor

sftim commented Sep 18, 2023

See kubernetes/website#37444

I'd prefer to have the button act only as an override for the user's own preference, when that preference is available.

@xrstf xrstf deleted the dark-mode-apidocs branch September 21, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants