andoriyaprashant / DevDocsHub

DevDocsHub is a robust Django-based web application designed to serve as a comprehensive repository for programming and open-source documentation.
MIT License
9 stars 62 forks source link

#bug: Dark Mode toggle button text does not update to reflect current mode. #3

Open omjadhav18 opened 1 month ago

omjadhav18 commented 1 month ago

In the current implementation while switching between dark mode to light mode the text of the button remains the same i.e. dark mode. Screenshot 2024-10-01 185137

Steps to Reproduce:

  1. Click on the "Dark Mode" button to enable dark mode.
  2. Notice that the button text remains "Dark Mode" even though the page has switched to dark mode.

Expected Behavior: When dark mode is enabled, the button text should change to "Light Mode" to allow users to switch back to light mode. Similarly, when the light mode is active, the button text should display "Dark Mode."

Proposed Solution:

  1. Update the button text dynamically based on the current theme mode (dark or light) by checking whether the dark mode is active and adjusting the button text accordingly.
omjadhav18 commented 1 month ago

Please add the label GSSoC 2024 Extd. and assign this issue to me. I would like to work on fixing it.

omjadhav18 commented 1 month ago

I've opened a PR to resolve this issue. You can review the changes here: [https://github.com/andoriyaprashant/DevDocsHub/pull/5]