Skip to content

Commit

Permalink
🐞fix sidebar submenu 'active' items issue #1
Browse files Browse the repository at this point in the history
🎨 update sidebar .no-icon css
  • Loading branch information
colinwilson committed Nov 22, 2022
1 parent 4b2a549 commit 4d99f27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion assets/docs/scss/custom/structure/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,18 @@
background-color: var(--sidebar-menu-active-bg);
}
}
&.no-icon a:before {
&.no-icon {
> a:before {
// content: "\e931" !important;
content: none !important;
}

> button {
margin: 1px 0 1px 0;
&:hover {
margin: 1px 0 1px 0;
}
}
}
}

Expand Down
1 change: 1 addition & 0 deletions layouts/partials/docs/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<div class="sidebar-submenu {{ if $active }}d-block{{ end }}">
<ul>
{{ range .Pages }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
Expand Down

0 comments on commit 4d99f27

Please sign in to comment.