-
Notifications
You must be signed in to change notification settings - Fork 96
Docs: Update Theme Logic #1491
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
Docs: Update Theme Logic #1491
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the theme system logic to handle different page types dynamically and adds Turbo navigation support. The changes centralize theme initialization logic and ensure proper theme handling during page transitions.
- Refactored theme logic to conditionally handle site pages vs. regular pages with different stylesheets
- Added Turbo navigation event listener to reinitialize themes on page transitions
- Removed duplicate theme initialization script from base template
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/webawesome/docs/assets/scripts/theme.js | Added conditional logic for site pages, Turbo support, and centralized theme initialization |
| packages/webawesome/docs/_includes/base.njk | Removed inline theme initialization script |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b1c7420 to
232b32a
Compare
KonnorRogers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
* theming logic is handled by theme.js and theme-selector.njk, mmkay?
232b32a to
45db8d8
Compare
This PR refactors the theme system logic to handle different page types dynamically and adds Turbo navigation support. The changes centralize theme initialization logic and ensure proper theme handling during page transitions.