File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ type Props = {
66};
77
88const { headings } = Astro .props ;
9- let filteredHeadings = headings .filter ((heading ) => heading .depth <= (headings .length > 10 ? 2 : 4 ));
9+ let filteredHeadings = headings .filter ((heading ) => heading .depth <= (headings .length > 10 ? 3 : 4 ));
1010---
1111
1212<div class =" lg:sticky top-4 py-4 max-w-xs max-h-[calc(100vh-2rem)] overflow-y-auto" >
@@ -17,7 +17,7 @@ let filteredHeadings = headings.filter((heading) => heading.depth <= (headings.l
1717 filteredHeadings .map ((item ) => (
1818 <li
1919 class = " list-none"
20- style = { ` padding-left: ${(item .depth - 1 ) * 1.25 }rem; ` }
20+ style = { ` padding-left: ${(item .depth - 2 ) * 1.25 }rem; ` }
2121 aria-label = { item .text }
2222 role = " listitem"
2323 >
@@ -27,7 +27,7 @@ let filteredHeadings = headings.filter((heading) => heading.depth <= (headings.l
2727 href = { ` #${item .slug } ` }
2828 >
2929 { /* Conditionally apply smaller text size for deeper levels */ }
30- <span class :list = { [" flex-1" , item .depth > 2 ? " text-xs" : " text-sm" ]} title = { item .text } >
30+ <span class :list = { [" flex-1" , item .depth > 3 ? " text-xs" : " text-sm" ]} title = { item .text } >
3131 { item .text }
3232 </span >
3333 </a >
You can’t perform that action at this time.
0 commit comments