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

Dark Mode #32

Open
cabhijith opened this issue Jul 21, 2020 · 3 comments
Open

Dark Mode #32

cabhijith opened this issue Jul 21, 2020 · 3 comments

Comments

@cabhijith
Copy link

Hi!
Thanks for this! Really good. Is there anyay to get dark mode for this theme, cause I would like the code to match the backgorund of the site. Thanks!

@ongyx
Copy link

ongyx commented Jan 18, 2021

I have written up some JS that toggles light/dark mode based on your OS setting, and can be toggled manually using a button on the navigation bar:
Screenshot (5)

Of course, you can move the button (this line) elsewhere.

Basically, it inverts the colours of the page and then rotates their hues to look nicer.

The meat of the toggling code is in assets/style.js.
I will prepare a pull request with these changes, but the code does not persist dark mode (sometimes) across the whole site yet.

I am a Python dev, not a JS dev. Improvements to my fork here is welcome.

@ongyx ongyx mentioned this issue Jan 18, 2021
@ongyx
Copy link

ongyx commented Jan 20, 2021

I made some improvements to the toggle (see my comment in the closed PR above)

@torbendury
Copy link

If you want to statically go in dark mode and not enable users to toggle it, you might consider editing your stylesheet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants