Skip to content

Commit a983f6f

Browse files
committed
use scrollspy on docs pages
1 parent 4cb046a commit a983f6f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

site/assets/scss/_toc.scss

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// stylelint-disable selector-max-type
2+
// stylelint-disable selector-no-qualifying-type
23

34
.bd-toc {
45
@include media-breakpoint-up(lg) {
@@ -29,10 +30,18 @@
2930
}
3031

3132
a {
33+
padding: .1rem .2rem;
3234
color: inherit;
35+
text-decoration: none;
36+
@include border-radius(.2rem);
3337

34-
&:not(:hover) {
35-
text-decoration: none;
38+
&:hover,
39+
&.active {
40+
color: $bd-purple;
41+
background-color: $bd-purple-light;
42+
}
43+
&.active {
44+
font-weight: 500;
3645
}
3746

3847
code {

site/layouts/_default/docs.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ define "body_override" }}<body data-bs-spy="scroll" tabindex="0" data-bs-target="#TableOfContents">{{ end }}
12
{{ define "main" }}
23
<div class="container-xxl bd-gutter mt-3 my-md-4 bd-layout">
34
<aside class="bd-sidebar">

0 commit comments

Comments
 (0)