feat: add dark/light mode toggle with localStorage persistence#209
Open
shubh22-u wants to merge 4 commits into
Open
feat: add dark/light mode toggle with localStorage persistence#209shubh22-u wants to merge 4 commits into
shubh22-u wants to merge 4 commits into
Conversation
|
@shubh22-u is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary [required]
This PR adds a Dark/Light mode toggle to the DevPath website.
The site previously had no theme switching option, which caused
eye strain for users browsing in low-light environments. A toggle
button (🌙/☀️) has been added to the navbar that smoothly switches
between dark and light themes, and the user's preference is saved
using localStorage so it persists across page refreshes.
Related Issue [required]
Closes #187
Type of Change [required]
What Was Changed [required]
templates/index.htmlstatic/style.cssstatic/script.jsHow to Test This PR [required]
git checkout feat/dark-light-modepip install -r requirements.txtpython app.pypython tests/test_basic.pyExpected test output:
Test Results [required]
This is a frontend-only change (HTML, CSS, JS).
No Python logic was modified. All existing tests pass as no
backend code was changed.
Screenshots (if UI change)
Self-Review Checklist [required]
feat/dark-light-modeprint()orconsole.log()debug statementsNotes for Reviewer
The toggle button is placed in the navbar for easy access on all pages.
CSS variables are used for clean theme switching without overriding
existing styles. localStorage ensures the user preference is remembered
across sessions. Please test on both mobile and desktop views.
Closes #<187>
Added dark/light mode toggle button in navbar.
Changes made: