Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion _assets/styles/_nav.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// The fixed navbar's height: the brand mark plus the padding around it.
// _custom.scss offsets the page by the same number.
$navbar-height: 74px;

.navbar-toggler svg {
height: 24px;
}

.navbar-toggler-wrapper {
display: flex;
flex-direction: row-reverse;
height: 74px;
height: $navbar-height;
}

bento-sidebar {
Expand All @@ -21,3 +25,25 @@ bento-sidebar {
border-left-color: $primary;
}
}

// 78% white is 10.93:1 on the ink, and stays back from the current page.
.navbar-dark {
--bs-navbar-color: rgb(255 255 255 / 78%);
--bs-navbar-hover-color: #fff;
}

// Full height, so the current-page rule lands on the bar's bottom edge. The
// negative margin reaches out through the navbar's padding, and reads it
// rather than repeating it.
.navbar-dark .navbar-nav .nav-link {
display: flex;
align-items: center;
height: $navbar-height;
padding-block: 0;
margin-block: calc(var(--bs-navbar-padding-y) * -1);
}

// Marks the current page beside `aria-current`, so it is not colour alone.
.navbar-dark .nav-link.active {
border-bottom: 2px solid $primary;
}
6 changes: 6 additions & 0 deletions _includes/header.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<a
class='nav-link{% if body_classes contains link.class %} active{% endif %}'
href='/{{ link.permalink }}'
{% if body_classes contains link.class %}
aria-current='page'
{% endif %}
>
{{ link.text }}
</a>
Expand Down Expand Up @@ -54,6 +57,9 @@
<a
class='nav-link{% if body_classes contains link.class %} active{% endif %}'
href='/{{ link.permalink }}'
{% if body_classes contains link.class %}
aria-current='page'
{% endif %}
>
{{ link.text }}
</a>
Expand Down
Loading