Skip to content

Conversation

aditi-jadhav-arch
Copy link
Contributor

##Which issue does this PR close?

Closes #454

##Rationale for this change

  • Previously, the footer logo and logos on secondary pages (services.html, blogListing.html, work.html, etc.) did not update correctly when the color theme was toggled.
  • Multiple scattered implementations were causing inconsistent behavior and a broken user experience.
  • This PR centralizes the logo-switching logic, refactors redundant code, and ensures a consistent and reliable theme-switching mechanism across the website.

##What changes are included in this PR?

  • Fixed a critical bug where the footer and page-specific logos were not updating when the theme changed.
  • Centralized all logo-switching logic into the updateLogo() method in darkMode.js, creating a single source of truth.
  • Implemented a consistent HTML pattern using the theme-aware-logo class and data-light-src / data-dark-src attributes for all theme-aware images.
  • Refactored and cleaned up redundant/conflicting inline CSS and JavaScript in blogListing.html and work.html.
  • Ensures the user's last chosen theme is remembered via localStorage and applied consistently across all pages.
  • Made the system easily extensible: future theme-aware images can use the theme-aware-logo class with appropriate data- attributes.

##Are these changes tested?

  • Yes, manually tested in both light and dark modes to ensure all logos update correctly.
  • Confirmed theme persistence across page reloads.

##Are there any user-facing changes?

Yes, the logo now changes color correctly on all pages when the theme is toggled, providing a seamless user experience.

##Screenshots

  • Light mode:
  1. Navbar
Screenshot 2025-09-12 000329
  1. Footer
Screenshot 2025-09-12 000345
  • Dark mode:
  1. Navbar
Screenshot 2025-09-12 000405
  1. Footer
Screenshot 2025-09-12 000418

Copy link

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

Copy link

netlify bot commented Sep 11, 2025

Deploy Preview for growcraftt ready!

Name Link
🔨 Latest commit b3044ce
🔍 Latest deploy log https://app.netlify.com/projects/growcraftt/deploys/68c4e3fe58c598000838c8b9
😎 Deploy Preview https://deploy-preview-476--growcraftt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@aditi-jadhav-arch
Copy link
Contributor Author

@gyanshankar1708 Please review the PR.

@gyanshankar1708 gyanshankar1708 merged commit 6c29605 into gyanshankar1708:master Sep 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logo Text Not Visible in Light Mode
2 participants