mirror of
https://github.com/corazoncp/corazoncp-landing.git
synced 2026-11-30 20:20:32 +00:00
* test(nav): add Red build-partial contract tests and migrate suites to dist - Point hero-whatsapp and services-catalog HTML assertions at dist/index.html so the deployable artifact is the tested seam; keep stylesheet token assertions on source - Add tests/html-partials.test.js covering partial includes, stripped build hints, root-relative nav, canonical/OG metadata, preserved Kundalini wa.me CTA, and missing-partial error behavior - Rationale: TDD Red checkpoint for issue #5; new assertions fail against the pre-plugin build for the expected reasons while migrated suites remain green * feat(build): add HTML partials plugin and single-entry Vite build - Add scripts/html-partials-plugin.ts to expand src/partials includes, fail loudly on unresolved paths, normalize dev/build route keys, apply/strip data-nav-current markers, and full-reload on partial edits - Register the plugin before Vite transforms and pin rollup input to the root index.html for Phase 1 - Rationale: build-time injection keeps shared markup dependency-free and preserves identical dev/build route keys ahead of the new pages * test(nav): add Red disclosure menu and a11y style contract tests - Assert nav-menu.js class-based toggle, aria-expanded sync, Escape focus return, and same-page hash close without DOM dependencies - Assert source/built module wiring and the header partial's collapsed mobile panel with the brand title preserved - Assert style.css scroll padding, active underline, focus ring, reduced motion, and gated-link/disclaimer touch-target rules - Rationale: Red checkpoint for issue #5 AC #2/#3; all failures are missing files or missing rules * feat(nav): add shared partials, mobile disclosure menu, and home metadata - Extract header, footer and floating WhatsApp button into src/partials and replace inline markup in index.html with build-time @include markers - Add dependency-free src/scripts/nav-menu.js with class-based toggle, aria-expanded sync, Escape focus return and same-page hash close; load it as an ES module - Add root-relative nav, 44px disclosure target and single-tree mobile panel; add sticky-header scroll padding, focus ring, active underline, reduced-motion and gated-link/disclaimer styles - Add canonical and Open Graph tags for / while preserving every section's copy and Service Card 2's live wa.me CTA (route change deferred to a later issue) - Rationale: shared markup stays build-time only, keeping main deployable with zero new runtime dependencies and no broken links * fix(nav): place mobile disclosure toggle inside nav landmark - Move the mobile disclosure button inside the primary nav landmark in src/partials/header.html - Keep the header flex container at two children so the toggle stays flush right at 430px-767px instead of floating beside a 0px nav (CR-04) * test(nav): execute nav-menu and built bundle against DOM double - Execute src/scripts/nav-menu.js and the built bundle against a DOM double for toggle, Escape, and same-page vs cross-page link behavior - Verify built CSS rules and header disclosure structure inside the nav landmark (CR-01, CR-03, CR-04, CR-05, CR-07) * test(partials): add path-guard and route-key boundary tests - Add unit tests for expandHtmlPartials path-guard rejection of disallowed @include specifiers and transformIndexHtml route-key marking - Verify built HTML strips build markers/hints, preserves Open Graph/canonical metadata, and keeps header navigation invariants (CR-02, CR-06, CR-07) * fix(nav): keep mobile brand title on a single line at 375px - Use text-sm tracking-wide whitespace-nowrap on mobile and restore sm:text-xl sm:tracking-wider at >= 640px - Resolves RV-02 375px brand-title wrapping failure while keeping desktop header styling unchanged * fix(nav): switch desktop nav breakpoint to lg and prevent brand overlap - Header layout (src/partials/header.html): move desktop nav expansion from md: to lg: (1024px), add shrink-0 on the brand link, and add gap-4 on the header flex row to prevent brand/nav overlap at 768px-1018px (PR #9 CR-08) - Nav menu tests (tests/nav-menu.test.js): update built-header assertions to check lg:flex/lg:static/lg:hidden, gap-4 on the header inner flex container, and shrink-0 plus lg:hidden exclusion on the brand link