Add light/system/dark theme toggle - #4
Merged
Merged
Conversation
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.
Adds the canonical 3-button ImpactMojo theme selector (system / light / dark, defaulting to system) to FieldCases.
What
<head>no-flash bootstrap that resolves the saved theme before paint and setsdata-themeon<html>.site-headernav on bothindex.htmlandstudy.html.<body>script that wires up clicks, persists picks tolocalStorage[imx_theme], clears the key when system is chosen, and follows OS appearance changes when no explicit pick is set.[data-theme="dark"]block incss/style.cssthat re-declares only the colour variables (the existing CSS already referencesvar(--bg),var(--text), etc. throughout, so the page flips automatically), plus.theme-selector/.theme-btnstyles.Notes
imx_themelocalStorage key as the rest of the ImpactMojo platform, so dark/light state is shared with the sister DevDiscourses site (samevarnasr.github.ioorigin).https://claude.ai/code/session_01PV6opcHjmKddEUhLUL5JUK