|
| 1 | +import type { NavSection } from "@/lib/types"; |
| 2 | + |
| 3 | +/** |
| 4 | + * ANCHOR ID CONTRACT (Phase 2.1) — read before building any section. |
| 5 | + * |
| 6 | + * These ids are the single source of truth for in-page navigation. Every |
| 7 | + * section component built in Phases 2.2+ MUST render a top-level element |
| 8 | + * with the matching `id` (e.g. `<section id="hero">`), in this order. |
| 9 | + * |
| 10 | + * - The navbar's active-section highlight observes exactly these ids; a |
| 11 | + * section that renders a different id will never highlight. |
| 12 | + * - Jump-to-section offset under the sticky navbar is handled globally via |
| 13 | + * `scroll-padding-top` on `html` (styles/globals.css) — sections must NOT |
| 14 | + * add their own `scroll-mt-*`. |
| 15 | + * - The navbar height is h-16 (4rem); `scroll-padding-top` is 5rem to leave |
| 16 | + * breathing room below it. |
| 17 | + * - "Home" points at the Hero section — there is no separate home anchor. |
| 18 | + * |
| 19 | + * Changing an id here is a breaking change for every section that anchors |
| 20 | + * to it; do it only in a change that updates both sides. |
| 21 | + */ |
| 22 | +export const navSections = [ |
| 23 | + { id: "hero", label: "Home" }, |
| 24 | + { id: "about", label: "About" }, |
| 25 | + { id: "journey", label: "Journey" }, |
| 26 | + { id: "skills", label: "Skills" }, |
| 27 | + { id: "experience", label: "Experience" }, |
| 28 | + { id: "projects", label: "Projects" }, |
| 29 | + { id: "certifications", label: "Certifications" }, |
| 30 | + { id: "tryhackme", label: "TryHackMe" }, |
| 31 | + { id: "github", label: "GitHub" }, |
| 32 | + { id: "blog", label: "Blog" }, |
| 33 | + { id: "contact", label: "Contact" }, |
| 34 | +] satisfies NavSection[]; |
0 commit comments