Skip to content
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

nav: set the active item on the top navigation #197

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulRbr
Copy link
Member

@paulRbr paulRbr commented Mar 25, 2024

Based on the three collections “help”, “guides” and “product-updates”
this commit adds a CSS property active on the active category in the
top navigation bar.

Visually I've simply added an underlined text decoration (but fill
free to suggest something else).

before

Capture d’écran du 2024-04-22 18-00-30

after

Capture d’écran du 2024-04-22 18-00-24

Part of #193

Based on the three collections “help”, “guides” and “product-updates”
this commit adds a CSS property `active` on the active category in the
top navigation bar.

Visually I've simply added an underlined text decoration (but fill
free to suggest something else).

Part of bump-sh#193
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for bump-content-hub ready!

Name Link
🔨 Latest commit bd81812
🔍 Latest deploy log https://app.netlify.com/sites/bump-content-hub/deploys/66015e0881a2fc000891c8c9
😎 Deploy Preview https://deploy-preview-197--bump-content-hub.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 site configuration.

@paulRbr paulRbr requested a review from thimy March 25, 2024 11:21
@paulRbr paulRbr self-assigned this Mar 25, 2024
@@ -1,3 +1,3 @@
<nav-item>
<nav-item<% if @active %> class="active"<% end %>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using the a11y attribute aria-current=true instead?

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.

None yet

2 participants