fix: Add theme toggle button and dynamic copyright year to contact page (#1414, #1415)#1426
Open
1234-ad wants to merge 3 commits into
Open
fix: Add theme toggle button and dynamic copyright year to contact page (#1414, #1415)#14261234-ad wants to merge 3 commits into
1234-ad wants to merge 3 commits into
Conversation
- Automatically updates copyright year to current year - Works across all pages with .copyright class - Replaces hardcoded years with dynamic year - Logs update confirmation to console - Fixes issue apu52#1415 This script ensures the copyright year is always current without manual updates.
Fixes apu52#1414 - Theme toggle button missing on contact page Fixes apu52#1415 - Hardcoded copyright year Changes: - Added themeToggle.css stylesheet link in head section - Replaced old theme toggle with proper implementation matching index.html - Added proper theme toggle button in heading1 container - Removed duplicate/conflicting theme toggle code - Added copyright-year.js script to dynamically update copyright year - Copyright year will now automatically update to current year The contact page now has consistent theme toggle functionality with other pages and the copyright year will always display the current year without manual updates.
β Deploy Preview for cute-quokka-b093d8 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Thank you for submitting your pull request! π We'll review it as soon as possible. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! π |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two bugs reported in issues #1414 and #1415:
Issue #1414: Theme Toggle Button Missing on Contact Page
The contact.html page had an old, non-functional theme toggle implementation that didn't match the working implementation on other pages.
Solution:
themeToggle.cssstylesheet linkIssue #1415: Hardcoded Copyright Year (2024)
The footer displayed "Β© 2024 METAVERSE" with a hardcoded year that would become outdated.
Solution:
assets/js/copyright-year.js- a dynamic script that automatically updates copyright year.copyrightand replaces any 4-digit year with current yearChanges Made
Files Modified:
<link rel="stylesheet" href="./assets/css/themeToggle.css">in head<script src="./assets/js/copyright-year.js"></script>before closing body tagFiles Created:
assets/js/copyright-year.js
.copyrightclassFIXES_APPLIED.md
Benefits
β Users can now switch between light/dark themes on contact page
β Copyright year automatically updates without manual intervention
β Consistent design and functionality across all pages
β Future-proof solution requiring no annual updates
β Improved accessibility and user experience
Testing
Screenshots
The theme toggle button now appears in the heading section of the contact page, matching the implementation on index.html and other pages.
Related Issues
Closes #1414
Closes #1415
Note: The copyright-year.js script can be added to other pages (index.html, about.html, etc.) to ensure consistent dynamic copyright across the entire site.