-
Notifications
You must be signed in to change notification settings - Fork 32
Add Dark/Light Mode Toggle to Writers Program site #43
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
base: main
Are you sure you want to change the base?
Add Dark/Light Mode Toggle to Writers Program site #43
Conversation
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.
Thank you and congratulations 🎉 for opening your very first pull request in writers-program
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 implements a dark mode theme toggle feature for the Keploy contribution website using Tailwind CSS. The implementation includes a theme toggle button, dark mode styles, and various UI improvements.
Key Changes:
- Added Tailwind CSS configuration and PostCSS build pipeline for generating theme utilities
- Implemented a theme toggle button with localStorage persistence and keyboard accessibility
- Updated footer styling with improved newsletter input design and horizontal social icons layout
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tailwind.config.js | New Tailwind configuration with Keploy brand colors and dark mode class strategy |
| postcss.config.js | PostCSS configuration for Tailwind and autoprefixer processing |
| package.json | Added build scripts and dependencies for Tailwind CSS, PostCSS, and autoprefixer |
| js/theme-toggle.js | New JavaScript module handling theme toggle logic with localStorage and keyboard support |
| css/tailwind.css | Tailwind directives and custom dark mode styles for various UI sections |
| css/tw.css | Generated Tailwind utility classes and dark mode overrides |
| css/main.css | Refactored header controls, theme toggle button styles, and footer component styling |
| index.html | Added theme toggle button, updated bunny image, integrated Tailwind CSS, and changed newsletter icon |
| styles.html | Added theme toggle button and integrated Tailwind CSS with cache-busting parameters |
Comments suppressed due to low confidence (1)
index.html:260
- Corrected spelling of 'Prorgam' to 'Program'.
<h3> An Open-Source Prorgam for Students, Professionals, and Freelancers</h3>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @tailwind components; | ||
| @tailwind utilities; |
Copilot
AI
Nov 3, 2025
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.
Missing @tailwind base; directive. Tailwind CSS typically requires all three directives (base, components, utilities) for proper functionality. Without the base layer, CSS resets and default styles won't be applied, which may lead to inconsistent styling across browsers.
| <link rel="stylesheet" href="css/main.css?v=dlm2"> | ||
| <link rel="stylesheet" href="css/tw.css?v=dlm2"> |
Copilot
AI
Nov 3, 2025
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.
Cache-busting version parameters are inconsistent between index.html (v=dlm2) and styles.html (v=dlm1). Consider using a consistent versioning strategy across all HTML files or implementing a build-time variable to maintain synchronization.
css/main.css
Outdated
|
|
||
| /* When dark theme is active, don't show the opaque white chip — keep it transparent/dark */ | ||
| .dark .header-menu-toggle.opaque { | ||
| background-color: rgba(255,255,255,0.0); /* subtle translucent so it doesn't pop as white */ |
Copilot
AI
Nov 3, 2025
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.
Using rgba(255,255,255,0.0) is unnecessarily verbose for a fully transparent background. Use transparent instead for better readability and maintainability.
| background-color: rgba(255,255,255,0.0); /* subtle translucent so it doesn't pop as white */ | |
| background-color: transparent; /* subtle translucent so it doesn't pop as white */ |
package.json
Outdated
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "build:css": "npx postcss css/tailwind.css -o css/main.css", |
Copilot
AI
Nov 3, 2025
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.
The build:css script outputs to css/main.css, which will overwrite the existing main.css file that contains custom styles. This appears to be a mistake since build:tw correctly outputs to css/tw.css. The build:css script should likely be removed or renamed to avoid confusion and prevent accidental overwriting of main.css.
| "build:css": "npx postcss css/tailwind.css -o css/main.css", |
| align-items: center; | ||
| justify-content: center; | ||
| position: absolute; | ||
| top: 33%; |
Copilot
AI
Nov 3, 2025
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.
The submit button positioning uses top: 33% with transform: translateY(-50%), resulting in a final vertical position of approximately 8% from the top. This appears incorrect for centering the button vertically within the input field. Change top: 33% to top: 50% for proper vertical centering.
| top: 33%; | |
| top: 50%; |
amaan-bhati
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.
Hey @AmanKashyap0807 Thanks for raising this pr, can you please provide a preview in forn of a video for the whole page. Also, please take a look at the copilot review added in the pr.
|
Hello, Amaan, sir
I hope all is well with you, and I sincerely apologize for not receiving
your mail.
I'm hoping you recall I've nearly finished adding a dark/light mode to the
writers program website. In accordance with your message, I'll send you the
entire page video and ask that you let me know if there are any changes.
Warm regards,
Aman Kashyap
…On Tue, Nov 25, 2025 at 11:34 PM Amaan Bhati ***@***.***> wrote:
***@***.**** commented on this pull request.
Hey @AmanKashyap0807 <https://github.com/AmanKashyap0807> Thanks for
raising this pr, can you please provide a preview in forn of a video for
the whole page. Also, please take a look at the copilot review added in the
pr.
—
Reply to this email directly, view it on GitHub
<#43 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJBVK727K4VYDIUTQKMTE6D36SK4TAVCNFSM6AAAAACLANSWWSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTKMBWGI2TMNJXGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description
This PR implements a dark/light mode toggle for the Writers Program website, enhancing accessibility and modern UI standards.
Related Issue
Fixes #3075
What I implemented
Acceptance Criteria Checklist
Dark and light modes switch seamlessly across the app.

Mode persists across page reloads and navigation/Text, background, and components have proper contrast in both modes/Components from UI libraries integrate without breaking the theme.
https://github.com/user-attachments/assets/163ac91c-01a4-4e9f-802d-5cd9b4968e86
Open to Feedback
If you’d like this implemented differently (e.g., toggle position, style), let me know—I can update it as per your suggestions!
Thanks
Thank you for your time in reviewing this contribution! Looking forward to feedback and suggestions.