feat: add animated sun/moon theme toggle to all pages#1661
Merged
omroy07 merged 1 commit intoomroy07:mainfrom Feb 26, 2026
Merged
feat: add animated sun/moon theme toggle to all pages#1661omroy07 merged 1 commit intoomroy07:mainfrom
omroy07 merged 1 commit intoomroy07:mainfrom
Conversation
|
@nur-hasin is attempting to deploy a commit to the Om Roy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
|
🎉 Congrats @nur-hasin on getting your PR merged! 🙌 |
Contributor
Author
|
Hi @omroy07, my PR has been merged but is currently labeled only for ECWoC26. I'm also a participant in SWoC26 and forgot to mention both programs earlier. Would it be possible to add the SWoC26 label as well? Thank you. |
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.
Which issue does this PR close?
Rationale for this change
The platform lacked a consistent dark/light mode toggle across all pages. Users had no way to switch themes on most pages, and several pages had conflicting or broken theme implementations that caused visual issues (wrong background colors, oversized buttons, invisible toggles).
What changes are included in this PR?
<head>on all pages to avoid theme flicker on loadtheme.js- reads/writes tolocalStorageand setsdata-themeon<html>[data-theme="dark"].classto[data-theme="dark"] .class)data-themeattributes from<body>tagsAre these changes tested?
Manually tested on all pages in both light and dark modes in Edge. Verified:
Are there any user-facing changes?
Yes, users can now toggle between light and dark mode on every page of the platform. The selected theme is saved and applied consistently across all pages.
Screenshots