Feat: Dark theme support for Documents
Description:
I'd like to propose adding dark theme support to the llware documentation for a better user experience. Dark mode is increasingly popular for reducing eye strain, especially in low-light conditions. Implementing a dark mode option would allow users to switch between light and dark themes based on their preference or system settings.
Expected UI Changes:
-
Background: Change the background color from white to a dark shade (e.g.,
#121212or#1e1e1e) to provide a low-light, high-contrast experience. -
Text: Adjust text colors to a lighter shade (e.g.,
#e0e0e0or#ffffff) to maintain readability against the dark background. -
Links: Use a bright, distinct color for links (e.g.,
#1e90ffor#ff9800), ensuring they stand out on a dark background. - Buttons: Style buttons with high contrast, using darker shades for button backgrounds and light-colored text.
- Code Blocks: Ensure syntax highlighting adjusts for dark mode, with the background of code blocks becoming darker and the text colors being adjusted for visibility.
- UI Elements: Icons, borders, and input fields should be styled to suit the dark theme while maintaining usability and clarity.
Questions for Maintainers:
- Do you have any preferences for the approach to implementing dark mode (e.g., Tailwind CSS, custom CSS, or any other framework)?
- Would you prefer an automatic dark mode toggle based on system settings or a manual switch in the UI for users to choose?
Request: Assign me this issue
Hey @AkashJana18 I am very keen to work on this issue . I would be really happy if you could assign this issue to me.
@rohitmore07 I am already working on the issue and PR will be raised within few days
OK
No matter what changes i make ...I am not able to add the theme toggle button. As soon as i exec jekyll all the changes I made are reverted. Please help @MacOS
Alternative : Hard coded dark theme Other solution is to make the dark theme as default
Hi all,
thank you for your efforts!
We use just-the-docs. Therefore, the light and dark color schemes are supported out-of-the-box. The only feature to implement is a toggle button. See for more information https://just-the-docs.com/docs/configuration/#color-scheme, https://just-the-docs.com/docs/customization/#switchable-custom-scheme, and of course also the issue https://github.com/just-the-docs/just-the-docs/issues/1223. Ideally, we can get this merged into just-the-docs, so we do not have to maintain this ourself.
Thank you for the guidance @MacOS but the problem still persist. As i change the page the theme-toggler button and theme disappears.