File tree Expand file tree Collapse file tree 6 files changed +15
-12
lines changed
Expand file tree Collapse file tree 6 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 11<!-- Generated by mdbook-autosummary v0.1.9 - do not edit manually! -->
22
3- [ linux 内核学习] ( < > )
3+ [ 光线追踪] ( < > )
4+ - [ 数学基础] ( < > )
5+ - [ 映射与函数.md] ( < 数学基础/映射与函数.md > )
6+ - [ 泰勒公式] ( < 数学基础/泰勒公式.md > )
7+ - [ 洛必达法则] ( < 数学基础/洛必达法则.md > )
48- [ 测试] ( < > )
59 - [ 测试1] ( < > )
610 - [ 代码] ( < 测试/测试1/code.md > )
1014 - [ 测试5] ( < > )
1115 - [ 测试6] ( < > )
1216 - [ 内容] ( < 测试/测试1/测试2/测试3/测试4/测试5/测试6/内容.md > )
13- - [ 高等数学] ( < > )
14- - [ 映射与函数.md] ( < 高等数学/映射与函数.md > )
15- - [ 泰勒公式] ( < 高等数学/泰勒公式.md > )
16- - [ 洛必达法则] ( < 高等数学/洛必达法则.md > )
Original file line number Diff line number Diff line change 1- # linux 内核学习
1+ # 光线追踪
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -22,22 +22,25 @@ class MDBookSidebarScrollbox extends HTMLElement {
2222 if (href && !href.startsWith("#") && !/^(?:[a-z+]+:)?\/\//.test(href)) {
2323 link.href = path_to_root + href;
2424 }
25+
26+ var parent = link.parentElement;
27+ if (parent && parent.classList.contains("chapter-item")) {
28+ parent.classList.toggle("expanded");
29+ }
30+
2531 // The "index" page is supposed to alias the first chapter in the book.
2632 if (link.href === current_page || (i === 0 && path_to_root === "" && current_page.endsWith("/index.html"))) {
2733 link.classList.add("active");
28-
29- var parent = link.parentElement;
30- if (parent && parent.classList.contains("chapter-item")) {
31- parent.classList.add("expanded");
32- }
34+
3335 while (parent) {
3436 if (parent.tagName === "LI" && parent.previousElementSibling) {
3537 if (parent.previousElementSibling.classList.contains("chapter-item")) {
36- parent.previousElementSibling.classList.add ("expanded");
38+ parent.previousElementSibling.classList.toggle ("expanded");
3739 }
3840 }
3941 parent = parent.parentElement;
4042 }
43+ /**/
4144 }
4245 }
4346 // Track and set sidebar scroll position
You can’t perform that action at this time.
0 commit comments