-
Notifications
You must be signed in to change notification settings - Fork 468
Open
Labels
Description
Is there an existing feature request for this?
- I have searched the existing issues
What is your feature request?
It looks like a dark mode theme does exist inside _combo.css, starting on Line 1023 for Version 0.9.92.
Perhaps enabling a dark mode feature from the existing CSS code could be accomplished via following:
-
A toggle button or switch in the upper right corner or under My Account to switch between Light and Dark modes.
<button id="theme-toggle">Toggle Dark Mode</button> -
JavaScript to handle the functionality (example code below - untested).
const body = document.body;
// Check for saved theme preference in localStorage
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
body.classList.add('dark');
}
themeToggle.addEventListener('click', () => {
body.classList.toggle('dark');
// Save the current theme preference
if (body.classList.contains('dark')) {
localStorage.setItem('theme', 'dark');
} else {
localStorage.setItem('theme', 'light');
}
});
Is this something that could be done fairly easily? Thanks in advance for any input on this idea.
Code of Conduct
- I agree to follow this project's Code of Conduct