Skip to content

Commit

Permalink
use scrollspy on docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Oct 26, 2022
1 parent a7a2253 commit ce2015e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions site/assets/scss/_toc.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// stylelint-disable selector-max-type
// stylelint-disable selector-no-qualifying-type

.bd-toc {
@include media-breakpoint-up(lg) {
Expand Down Expand Up @@ -29,10 +30,18 @@
}

a {
padding: .1rem .2rem;
color: inherit;
text-decoration: none;
@include border-radius(.2rem);

&:not(:hover) {
text-decoration: none;
&:hover,
&.active {
color: $bd-purple;
background-color: $bd-purple-light;
}
&.active {
font-weight: 500;
}

code {
Expand Down
1 change: 1 addition & 0 deletions site/layouts/_default/docs.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ define "body_override" }}<body data-bs-spy="scroll" tabindex="0" data-bs-target="#TableOfContents">{{ end }}
{{ define "main" }}
<div class="container-xxl bd-gutter mt-3 my-md-4 bd-layout">
<aside class="bd-sidebar">
Expand Down

0 comments on commit ce2015e

Please sign in to comment.