-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Dark mode toggle #302
Dark mode toggle #302
Conversation
Also @ the maintainers: |
I think it should definitely be optional, as you could write your own color_scheme that is neither dark nor light -- in which case you may not want to enable a toggle or the |
#464 provides a As @pmarsceill mentioned, the appearance of a toggle button would need to be configurable, and not appear by default; but that would be easy to fix. The current conflicts with the latest release of the theme also need to be resolved. |
The JS code is mostly copied from https://derekkedziora.com/blog/dark-mode, following PR just-the-docs#302. Configurability enhancements: - toggle between custom schemes - toggle automatically on system preference changes - display button on all pages or just one - change button text This addition should be backwards compatible: the added features are activated only when the toggle configuration options are used.
Hi Patrick
I have added a dark mode toggle button (aux link) in the upper right.
You can preview it here if you like:
https://aronsommer.github.io/just-the-docs-dmt/
I have used the scripts from here:
https://medium.com/@derekkedziora/how-to-add-a-dark-mode-toggle-to-a-jekyll-site-a76dac00128d
Have a nice day!
Aron