Skip to content

Commit ab74082

Browse files
authored
smaller toc
1 parent 4b6a4d9 commit ab74082

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

docs/_layouts/on-this-page.html

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,7 @@
3636
{{ content }}
3737
</div>
3838
</div>
39-
<!-- <script>
40-
document.addEventListener("DOMContentLoaded", function() {
41-
const toc = document.querySelector(".toc");
42-
const firstHeader = document.querySelector("h1");
43-
const originalParent = toc?.parentNode;
44-
const originalNextSibling = toc?.nextSibling;
45-
46-
function moveTOC() {
47-
if (!toc || !firstHeader) return;
4839

49-
if (window.innerWidth <= 800) {
50-
// Move TOC after first header
51-
if (firstHeader.nextElementSibling !== toc) {
52-
firstHeader.insertAdjacentElement("afterend", toc);
53-
}
54-
} else {
55-
// Put TOC back in original place
56-
if (originalParent && toc.parentNode !== originalParent) {
57-
if (originalNextSibling) {
58-
originalParent.insertBefore(toc, originalNextSibling);
59-
} else {
60-
originalParent.appendChild(toc);
61-
}
62-
}
63-
}
64-
}
65-
66-
// Run on load
67-
moveTOC();
68-
69-
// Run on resize
70-
window.addEventListener("resize", moveTOC);
71-
});
72-
</script> -->
7340
<script>
7441
document.addEventListener("DOMContentLoaded", function() {
7542
const toc = document.querySelector(".toc");
@@ -125,6 +92,7 @@
12592
background: #1f1f1f;
12693
color: #f8f8f8;
12794
flex-shrink: 0;
95+
font-size: small;
12896
}
12997
.a {
13098
display:flex; align-items:flex-start; gap:2rem;

0 commit comments

Comments
 (0)