import type { SectionRecord } from '$entities/Section'; import { getCollection } from '$shared/api'; import type { NavItem } from '$widgets/Navigation'; import { MobileNav, SidebarNav } from '$widgets/Navigation'; import { SectionFactory } from '$widgets/SectionFactory'; import { SectionsAccordion } from '$widgets/SectionsAccordion'; /** * Portfolio home page. * * Fetches all sections at build time (SSG). Renders a fixed sidebar with * section navigation and a scrollable main column with accordion sections. */ export default async function Home() { const { items: sections } = await getCollection('sections', { sort: 'order', }); const navItems: NavItem[] = sections.map((s) => ({ id: s.slug, label: s.title, number: s.number, })); return (
{sections.map((s) => ( ))}
); }