File tree Expand file tree Collapse file tree 1 file changed +1
-33
lines changed
Expand file tree Collapse file tree 1 file changed +1
-33
lines changed Original file line number Diff line number Diff line change 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 >
7441document . addEventListener ( "DOMContentLoaded" , function ( ) {
7542 const toc = document . querySelector ( ".toc" ) ;
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 ;
You can’t perform that action at this time.
0 commit comments