feat(theme): add NTNU blue default, dark mode, and color/theme toggles#6
Open
G36maid wants to merge 5 commits into
Open
feat(theme): add NTNU blue default, dark mode, and color/theme toggles#6G36maid wants to merge 5 commits into
G36maid wants to merge 5 commits into
Conversation
…e toggle - Replace all red CSS variables with NTNU blue (#2E3192) from official Wikipedia SVG logo - Add [data-theme="dark"] block with lightened accent (#7A7DC4) for contrast on dark backgrounds - Add FOUC prevention script inline in <head> across all pages - Add 3-way theme toggle (light / auto / dark) in homepage nav and redirect preview page; persist choice via localStorage - Replace NTNU_Red.png with NTNU_Blue.png (PNG converted from the official Wikipedia SVG via rsvg-convert) and add the source SVG - Apply dark mode overrides to cards, inputs, buttons, banners, testimonials section, stats banner, and 404 page - Update QR code colorDark to NTNU blue on homepage
…oggle
- Restore original NTNU red palette (#9B2335) as a user-selectable
option
alongside the new blue (#2E3192)
- Wrap blue palette under :root + [data-color="blue"], add red palette
under [data-color="red"]
- Add color-aware dark mode primary overrides:
[data-color="blue"][data-theme="dark"] -> #7A7DC4
[data-color="red"][data-theme="dark"] -> #D67485
- Add 2-way color toggle (🔵/🔴) in homepage nav and redirect preview
page; persist via localStorage.color
- Update FOUC script on all 3 pages to apply data-color on initial load
- Fix dark mode elements that did not respect color override:
submit button (.btn-submit), feature icons (.feature-icon), and
testimonial avatars (.author-avatar) — all now use var(--primary)
instead of the dark gradient in dark mode
- 404 page honors localStorage.color via FOUC script (no UI toggle)
- Restore public/NTNU_Red.png for red mode - Add two <img> elements (logo-blue / logo-red) in homepage nav, homepage footer, and redirect preview card; toggle visibility via CSS attribute selectors on [data-color] - Hide red logo by default; show only when data-color="red"
The .btn class used var(--bg-gradient), which in dark mode becomes a neutral dark gradient — losing the blue/red color identity. Override to var(--accent) (already color-aware per [data-color]) so the redirect preview '立即前往' button keeps its color in dark mode.
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
Verification
Closes #5