Skip to content

Commit c072ea0

Browse files
2 parents 93c245e + 42a5cc1 commit c072ea0

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

linux_kernel/src/SUMMARY.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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>)
@@ -10,7 +14,3 @@
1014
- [测试5](<>)
1115
- [测试6](<>)
1216
- [内容](<测试/测试1/测试2/测试3/测试4/测试5/测试6/内容.md>)
13-
- [高等数学](<>)
14-
- [映射与函数.md](<高等数学/映射与函数.md>)
15-
- [泰勒公式](<高等数学/泰勒公式.md>)
16-
- [洛必达法则](<高等数学/洛必达法则.md>)

linux_kernel/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# linux 内核学习
1+
# 光线追踪

linux_kernel/theme/toc.js.hbs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)