Skip to content

Commit

Permalink
Merge pull request #250 from qld-gov-au/QOLOE-277-sidenav-navtitle-an…
Browse files Browse the repository at this point in the history
…d-active-item

QOLOE-277 Updating nav title and active item in side nav
  • Loading branch information
ghazal-salehi authored Jun 17, 2024
2 parents cce6f9e + e0b4169 commit 42de4dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/components/bs5/sidenav/sidenav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h2 class="nav-title">
{{#if navtitlelink }}
<a href="{{navtitlelink}}">{{navtitle}}</a>
<a class="nav-link" href="{{navtitlelink}}">{{navtitle}}</a>
{{else}}
{{navtitle}}
{{/if}}
Expand Down
39 changes: 19 additions & 20 deletions src/components/bs5/sidenav/sidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
color: var(--#{$prefix}-headings-color);
font-size: 1rem;
line-height: 1.5;
padding: 1rem;
margin: 0;
border-bottom: 2px solid var(--sidenav-heading-border-color);

Expand All @@ -66,6 +65,24 @@
}
}

.nav-link {
padding: var(--sidenav-navlink-padding);
font-size: 0.875rem;
color: var(--body-color);
text-decoration: none;
transition-duration: 0s;

//.nav-link Hover state
&:hover {
background-color: var(--sidenav-hover-bg);
color: var(--sidenav-hover-color);
text-decoration: underline;
text-underline-offset: 0.25rem;
text-decoration-thickness: 2px;
}

}

//Side navigation (ul.nav)

ul.nav {
Expand Down Expand Up @@ -102,31 +119,13 @@
> ul > li > ul > li { border-top: none }
> ul > li > ul > li > .nav-link { padding-left: var( --sidenav-level-three-padding); }

//All nav item links, all levels
.nav-link {
padding: var(--sidenav-navlink-padding);
font-size: 0.875rem;
color: var(--body-color);
text-decoration: none;
transition-duration: 0s;

//.nav-link Hover state
&:hover {
background-color: var(--sidenav-hover-bg);
color: var(--sidenav-hover-color);
text-decoration: underline;
text-underline-offset: 0.25rem;
text-decoration-thickness: 2px;
}

}

//li .nav-link.active
&.active {
.nav-link {
font-weight: 600;
color: var(--light-text-heading);
text-decoration: none;
pointer-events: none;
}
}

Expand Down

0 comments on commit 42de4dc

Please sign in to comment.