diff options
Diffstat (limited to 'src/components/blog/TOCHeading.astro')
| -rw-r--r-- | src/components/blog/TOCHeading.astro | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/components/blog/TOCHeading.astro b/src/components/blog/TOCHeading.astro deleted file mode 100644 index b9dd486..0000000 --- a/src/components/blog/TOCHeading.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import type { TocItem } from "@/utils/generateToc"; - -interface Props { - heading: TocItem; -} - -const { - heading: { children, depth, slug, text }, -} = Astro.props; ---- - -<li class={`${depth > 2 ? "ms-2" : ""}`}> - <a - class={`line-clamp-2 hover:text-accent ${depth <= 2 ? "mt-3" : "mt-2 text-xs"}`} - href={`#${slug}`}><span aria-hidden="true" class="me-0.5">#</span>{text}</a - > - { - !!children.length && ( - <ol> - {children.map((subheading) => ( - <Astro.self heading={subheading} /> - ))} - </ol> - ) - } -</li> |
