diff --git a/.gitignore b/.gitignore index e3d97f6..24df554 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,9 @@ dist/ # JetBrains IDE .idea/ +# Claude Code +.claude/ + # Unit test reports TEST*.xml diff --git a/astro-site/src/components/Header.astro b/astro-site/src/components/Header.astro index c28adf1..b7bdf98 100644 --- a/astro-site/src/components/Header.astro +++ b/astro-site/src/components/Header.astro @@ -90,4 +90,5 @@ const base = import.meta.env.BASE_URL; navToggle.setAttribute("aria-expanded", "false"); siteTabs.classList.remove("open"); }); + diff --git a/astro-site/src/components/MobileToc.astro b/astro-site/src/components/MobileToc.astro new file mode 100644 index 0000000..3fd4566 --- /dev/null +++ b/astro-site/src/components/MobileToc.astro @@ -0,0 +1,60 @@ +--- +interface Heading { + depth: number; + slug: string; + text: string; +} + +const { headings = [] } = Astro.props as { headings: Heading[] }; +const h2s = headings.filter((h) => h.depth === 2); +--- + +{h2s.length > 0 && ( +