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