Skip to content

Implement persistent underline for top-level site section in left side navigation#1373

Draft
kennethyyoung wants to merge 9 commits intoprocessing:mainfrom
kennethyyoung:underline-navigation
Draft

Implement persistent underline for top-level site section in left side navigation#1373
kennethyyoung wants to merge 9 commits intoprocessing:mainfrom
kennethyyoung:underline-navigation

Conversation

@kennethyyoung
Copy link
Copy Markdown

@kennethyyoung kennethyyoung commented Apr 27, 2026

Resolves #1303

Changes:
Implements a persistent underline for top-level navigation items (e.g., Reference, Examples, Tutorials). The underline remains active both on the top-level section page and while navigating through its sub-sections.

  • Added a new variable currentPath, derived from pathMinusLocal, in index.astro
  • Used .startsWith() to allow the underline to persist when the current path is a sub-section
  • Apply "current" to MainNavLinks to trigger the underline style
  • We are using the same linklabel style used in JumpToLinks.tsx. Updates to the underline style will change both the underline for top-level navigation and sub-section links.

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated
  • [Unit tests] are included/updated

Collaborative contribution from:
@kennethyyoung, @mikeng07, and @aaronalaman as part of the April 2026 CodeDay Microinternship.

@kennethyyoung kennethyyoung marked this pull request as ready for review April 27, 2026 19:23
@kennethyyoung kennethyyoung marked this pull request as draft April 27, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consistent style for top-level site section in left side navigation

2 participants