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 #20

Open
benoit74 opened this issue Sep 10, 2024 · 2 comments
Open

Dark mode #20

benoit74 opened this issue Sep 10, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@benoit74
Copy link
Contributor

Do we want to implement a dark mode just like devdocs.io is supporting? (not sure how all readers are passing the appropriate info, maybe worth to PoC if it is complex to implement in scraper)

@benoit74 benoit74 added the enhancement New feature or request label Sep 10, 2024
@benoit74 benoit74 added this to the later milestone Sep 10, 2024
@josephlewis42
Copy link
Collaborator

Absolutely! Changing the class on the <html> element from _theme-default to _theme-dark should get us most of the way there:

image

We can do that in JS based on user preferences (and/or a button) but it's likely users will see a flash on each page load before the JS kicks in and switches the page to dark mode. DevDocs is using Service Workers today so they can avoid that, but I don't think that's an option for us.

@benoit74
Copy link
Contributor Author

Cool ! I think that waiting for JS is the proper move. And if done with Vue.JS (our preference for now, but not a requirement, maybe it is too much work given devdocs specificities) I'm sure we can handle this in a way where there won't be a flickering

Service workers are indeed not an option, they are not supported by too many ZIM readers and a nightmare to support for these readers (we tried with zimit 1 ... we failed)

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

No branches or pull requests

2 participants