#1079: Add active state styling for "Contest" button on subpages under /contest path
Issue #1079 by dhuruvandb
This pull request adds an active state to the "Contest" button in the top navigation bar when users are on any page under the
#1078
This pull request implements active state styling for the "Contest" button in the top navigation bar when navigating to any subpage under the
!image
!image
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Add active state styling for "Contest" button on subpages under /contest path
Pull Request Details
Description
This pull request adds an active state to the "Contest" button in the top navigation bar when users are on any page under the
/contest path (e.g., /contest, /challenges, /hackathons, /internships, /jobs). - The "Contest" button will now change its background and text color to indicate the active state.
- This update improves navigation clarity and enhances the user experience by visually marking the "Contest" section when users are on any related subpage.
#1078
Type of PR
- [ ] Bug fix
- [x] Feature enhancement
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other (specify): **___**
This pull request implements active state styling for the "Contest" button in the top navigation bar when navigating to any subpage under the
/contest path.- Changes Summary:
- Updated navigation logic: The "Contest" button is now highlighted when users are on any page under the
path (e.g.,/contest
,/contest
,/challenges
,/hackathons
, or/internships
)./jobs - Added active state styles: Applied background and text color changes to visually indicate the active state of the "Contest" button when on these subpages.
- Updated navigation logic: The "Contest" button is now highlighted when users are on any page under the
Screenshots (if applicable)
!image
!image
Checklist
- [x] I have read and followed the Pull Requests and Issues guidelines.
- [x] The code has been properly linted and formatted using
andnpm run lint:fix
.npm run format:fix - [x] I have tested the changes thoroughly before submitting this pull request.
- [x] I have provided relevant issue numbers, snapshots, and videos after making the changes.
- [x] I have not borrowed code without disclosing it, if applicable.
- [x] This pull request is not a Work In Progress (WIP), and only completed and tested changes are included.
- [x] I have tested these changes locally.
- [x] My code follows the project's style guidelines.
- [x] I have updated the documentation accordingly.
- [x] This PR has a corresponding issue in the issue tracker.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- New Features
- Enhanced navigation link active state logic to provide better context awareness for users across related pages like challenges, hackathons, internships, and jobs.