Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme: Toggle theme without passing boolean value #153

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

nginx-jack
Copy link
Collaborator

@nginx-jack nginx-jack commented Feb 27, 2025

Adds new toggleTheme function, along with aliases for existing mf and useNewTheme functions. These functions can now be called as toggles, instead of explicitly passing a boolean i.e. mf() or useNewTheme() or toggleTheme() will toggle themes. Add aliases for mf and useNewTheme for backwards compatability.

Additional toggle options
When we fully release, we should have a "preview new theme" front and centre, until then, to encourage internal testing,
Add konami code to toggle (i.e. up,up,down,down,left,right,left,right,B,A) , from any page on the site, will toggle the theme

@nginx-jack nginx-jack requested review from a team as code owners February 27, 2025 13:19
@danielledeleo
Copy link
Contributor

I do like this way of toggling, but it's too early to have such a publicly visible button for the new design. We can revisit this PR later when we're ready to do the switchover.

@nginx-jack
Copy link
Collaborator Author

I do like this way of toggling, but it's too early to have such a publicly visible button for the new design. We can revisit this PR later when we're ready to do the switchover.

Yeah, sounds good to me. I'll remove the footer stuff :)

Adds new toggleTheme function, along with aliases
for existing mf and useNewTheme functions

Add konami code to toggle
@nginx-jack nginx-jack force-pushed the feat/nicer-theme-toggle branch from 0b70cd3 to 50b2ebe Compare February 27, 2025 16:17
@lamATnginx
Copy link
Collaborator

Functionality all run fine locally, nice easter egg. Agree with Dani on releasing a way to easily change the theme in the footer.

@nginx-jack nginx-jack merged commit de5dbc7 into main Feb 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants