-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
Example/update blog starter #66926
Example/update blog starter #66926
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
425a4aa
to
52b7ed5
Compare
@mayank1513 Let me know when this ready for |
I think this is ready for review/merge. |
@mayank1513 Can you update the packages as well (e.g., latest |
Done sir! Thank you for pointing out. |
- update classes for dark mode for footer and alert - use classnames lib for adding multiple classes to layout
- Add ServerTarget and Core components to layout - That's all that is required to get a working darkmode with Server Component sync
- Add Switch component from nextjs-darkmode - Add styles for the Switch component
- No cookies
…uired for this example
- Keeping 2 components in same file for clarity and readability
and set next to latest
3469801
to
82d6e83
Compare
What?
Updated blog-starter example to support dark theme. Also added a button to switch modes (User preference).
→ User can opt for dark / light / system mode
→ Mode is persisted using localStorage
→ Mode is also synced across browsing contexts
→ No FOUC (Flash of Unstyled Content)
→ Full SSG
→ No additional dependency
Why?
Now that dark mode is a first-class feature of many operating systems, it’s becoming more and more common to design a dark version of your website to go along with the default design.
How?
dark:
modifier