File tree Expand file tree Collapse file tree 5 files changed +43
-7
lines changed Expand file tree Collapse file tree 5 files changed +43
-7
lines changed Original file line number Diff line number Diff line change 25
25
}
26
26
27
27
.td-toc {
28
+ $toc-padding-base : 1rem ;
29
+ $toc-padding-increment : 0.5rem ; // for TOC entry nesting
30
+
31
+ margin-top : 1rem ;
32
+
28
33
a {
29
34
display : block ;
30
35
font-weight : $font-weight-light ;
36
41
display : block ;
37
42
}
38
43
39
- li li {
40
- margin-left : 0.5rem ;
44
+ > .toc-title {
45
+ font-weight : $font-weight-bold ;
46
+ color : var (--bs-secondary-color );
47
+ border-bottom : 1px solid var (--bs-tertiary-color );
48
+ padding-bottom : 0.5rem ;
49
+ margin-bottom : 0.5rem ;
41
50
}
42
51
43
52
#TableOfContents {
44
- // Hugo's ToC is a mouthful, this can be used to style the top level h2 entries.
45
- > ul > li > ul > li > a {
46
- }
53
+ margin-left : -0.75rem ;
47
54
48
55
a {
56
+ margin-left : 0 ;
57
+ padding-left : $toc-padding-base ;
58
+ text-decoration : none ;
59
+ border-left : .125rem solid transparent ;
60
+ transition : color 0.15s ease-in-out , border-color 0.15s ease-in-out ;
49
61
color : var (--bs-secondary-color );
50
62
63
+ & .active {
64
+ color : var (--bs-primary );
65
+ border-left-color : var (--bs-primary );
66
+ font-weight : $font-weight-medium ;
67
+ }
68
+
51
69
& :focus ,
52
70
& :hover {
53
71
color : initial ;
54
72
}
55
73
}
74
+
75
+ ul ul a {
76
+ padding-left : $toc-padding-base + $toc-padding-increment ;
77
+ }
78
+ ul ul ul a {
79
+ padding-left : $toc-padding-base + ($toc-padding-increment * 2 );
80
+ }
81
+ ul ul ul ul a {
82
+ padding-left : $toc-padding-base + ($toc-padding-increment * 3 );
83
+ }
84
+ ul ul ul ul ul a {
85
+ padding-left : $toc-padding-base + ($toc-padding-increment * 4 );
86
+ }
56
87
}
57
88
58
89
ul {
Original file line number Diff line number Diff line change
1
+ data-bs-spy="scroll" {{/**/ -}}
2
+ data-bs-target="#TableOfContents" {{/**/ -}}
3
+ data-bs-smooth-scroll="true" {{/**/ -}}
4
+ data-bs-root-margin="0px 0px -40%" {{/**/ -}}
Original file line number Diff line number Diff line change 2
2
{{ with .TableOfContents -}}
3
3
{{ if ne . `< nav id ="TableOfContents "> </ nav > ` -}}
4
4
< div class ="td-toc ">
5
+ < div class ="toc-title "> On this page</ div >
5
6
{{ . }}
6
7
</ div >
7
8
{{ end -}}
Original file line number Diff line number Diff line change 11
11
{{ partial "navbar.html" . }}
12
12
</ header >
13
13
< div class ="container-fluid td-outer ">
14
- < div class ="td-main ">
14
+ < div class ="td-main " {{ partialCached "td/scroll-spy-attr.txt" . | safeHTMLAttr }} >
15
15
< div class ="row flex-xl-nowrap ">
16
16
< aside class ="col-12 col-md-3 col-xl-2 td-sidebar d-print-none ">
17
17
{{ partial "sidebar.html" . }}
Original file line number Diff line number Diff line change 11
11
{{ partial "navbar.html" . }}
12
12
</ header >
13
13
< div class ="container-fluid td-outer ">
14
- < div class ="td-main ">
14
+ < div class ="td-main " {{ partialCached "td/scroll-spy-attr.txt" . | safeHTMLAttr }} >
15
15
< div class ="row flex-xl-nowrap ">
16
16
< aside class ="col-12 col-md-3 col-xl-2 td-sidebar d-print-none ">
17
17
{{ partial "sidebar.html" . }}
You can’t perform that action at this time.
0 commit comments