diff --git a/src/app/(markdown)/ep/page.tsx b/src/app/(markdown)/ep/page.tsx new file mode 100644 index 0000000..f053a5e --- /dev/null +++ b/src/app/(markdown)/ep/page.tsx @@ -0,0 +1,37 @@ +import { TOC } from "./toc"; + +export default function Page() { + return ( +
+ + +
+

Introducció

+

Contingut de l'article...

+ +

Exemple

+

Altres seccions del markdown...

+
+ + +
+ ); +} diff --git a/src/app/(markdown)/ep/toc.tsx b/src/app/(markdown)/ep/toc.tsx new file mode 100644 index 0000000..5a2b57a --- /dev/null +++ b/src/app/(markdown)/ep/toc.tsx @@ -0,0 +1,72 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; +import { XIcon } from "lucide-react"; +import { useState } from "react"; + +export function TOC() { + const [isOpen, setIsOpen] = useState(false); + + function handleLinkClick() { + // Només tanquem si estem en mòbil (breakpoint manual) + if (window.innerWidth < 1024) setIsOpen(false); + } + + return ( + <> + {/* Mobile TOC button */} +
+ +
+ + {/* TOC container */} + + + ); +}