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

Merged
merged 2 commits into from
Sep 11, 2024

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

Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for bump-content-hub ready!

Name Link
🔨 Latest commit 1e5dd46
🔍 Latest deploy log https://app.netlify.com/sites/bump-content-hub/deploys/66e193672d16710008d14485
😎 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?

paulRbr and others added 2 commits September 11, 2024 14:49
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
@thimy thimy force-pushed the highlight-current-category-in-nav branch from bd81812 to 1e5dd46 Compare September 11, 2024 12:56
@thimy
Copy link
Member

thimy commented Sep 11, 2024

I changed the style of the current page link to match what we have in the guides page, is that alright with you @grossyoan ?
image

@grossyoan
Copy link
Contributor

That's perfect Thimy!

@grossyoan grossyoan self-requested a review September 11, 2024 13:13
Copy link
Contributor

@grossyoan grossyoan left a comment

Choose a reason for hiding this comment

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

Lgtm!

@thimy thimy merged commit 8235935 into bump-sh:main Sep 11, 2024
5 checks passed
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.

3 participants