Commit 0090416
committed
Add scrollspy and responsive TOC; theme-init tweaks
Enable smooth scrolling and top padding; make the TOC sidebar sticky with a max-height and add .toc-link.active styling. Add a responsive media query to collapse the TOC into the content flow on smaller screens. Implement a ScrollSpy using IntersectionObserver in docmd-main.js to set active TOC links based on visible headings and wire it into DOMContentLoaded. Update theme-init.js to resolve the 'system' mode to an effective light/dark value and ensure the Highlight.js stylesheet is loaded for the resolved theme; also simplify HTML attribute handling. Removed an overflow:hidden on the main content wrapper to avoid clipping.1 parent 32da491 commit 0090416
File tree
3 files changed
+82
-15
lines changed- src
- assets
- css
- js
- templates/partials
3 files changed
+82
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
215 | | - | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
886 | 890 | | |
887 | 891 | | |
888 | 892 | | |
889 | | - | |
| 893 | + | |
890 | 894 | | |
891 | 895 | | |
| 896 | + | |
892 | 897 | | |
893 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
894 | 923 | | |
895 | 924 | | |
896 | 925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
212 | 249 | | |
213 | 250 | | |
214 | 251 | | |
| |||
219 | 256 | | |
220 | 257 | | |
221 | 258 | | |
| 259 | + | |
222 | 260 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
6 | 2 | | |
7 | 3 | | |
8 | 4 | | |
9 | | - | |
10 | 5 | | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
14 | | - | |
| 9 | + | |
15 | 10 | | |
16 | 11 | | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments