Skip to content

Commit 7e77232

Browse files
committed
feat: add pagetoc functionality with responsive design and active state management
1 parent 71461d8 commit 7e77232

File tree

5 files changed

+555
-2
lines changed

5 files changed

+555
-2
lines changed

book.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ name = "Español"
1616
rust = "#"
1717
go = "#"
1818

19+
[preprocessor.pagetoc]
20+
1921
[output.html.playground]
2022
editable = true
2123

@@ -25,4 +27,5 @@ site-url = "https://go-book.rustlang-es.org"
2527
git-repository-url = "https://github.com/RustLangES/rust-para-go-devs"
2628
git-repository-icon = "fa-github"
2729
edit-url-template = "https://github.com/RustLangES/rust-para-go-devs/edit/main/{path}"
28-
additional-css = ["theme/extra.css"]
30+
additional-css = ["theme/extra.css", "theme/pagetoc.css"]
31+
additional-js = ["theme/pagetoc.js"]

theme/extra.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
}
44
.editable.hljs.ace_editor {
55
padding: 1rem;;
6-
}
6+
}
7+
:root {
8+
--pagetoc-fontsize: 0.85em;
9+
}

0 commit comments

Comments
 (0)