mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(nav): mobile sheet + shared bar control chrome (v3 mobile navigation)
MobileMenu.tsx: conditional-mounted glass sheet (94% + blur(12px)), three labelled groups, staggered rows, Mode/Language/Theme-color segmented rows, Connect tiles, safe-area padding, overscroll contain. Navigation.tsx: honest dialog - Escape on document, inert on #main-content/.footer/.back-to-top, focus restore guarded by offsetParent, matchMedia close above 1024px, icon morph, navPaths from data; route-change close effect deleted. SocialLinks: single data-driven renderer (src/data/social.ts + strings.social.aria); Hero and Footer cut over; mailto without target/rel; dead .social-link span rule removed; hero/footer centering scoped. Bar: .nav-control shared chrome for mode/language/theme-color, icon-only 20px half-circle palette trigger at every width, <=420px bar guard; .nav glass 85% -> 94%. Docs: spec-v3-mobile-navigation.md v0.5.0 (Q14 recorded, gates re-run 16/16 SSR), spec-ui-layout.md and AGENTS.md corrected.
This commit is contained in:
1 parent
f2c920d6ad
commit
d0aa9958c8
16 files changed
+1386
-311
No files matched your search
@@ -91,10 +91,31 @@ App
|
||||
|
||||
| Property | Value |
|
||||
|---|---|
|
||||
| Location | Navigation bar (right side) |
|
||||
| Location | Navigation bar (right side); the mobile sheet carries a Dark/Light segmented control instead |
|
||||
| Icon | Sun/Moon icon |
|
||||
| Tooltip | Current mode (dark/light/system) |
|
||||
| Click behavior | Cycle: dark → light → system → dark |
|
||||
| Tooltip | Current mode (dark/light) |
|
||||
| Click behavior | Toggle: dark ↔ light — the `system` variant was removed (`src/hooks/useTheme.tsx:4`) |
|
||||
|
||||
### Theme Palette
|
||||
|
||||
| Property | Value |
|
||||
|---|---|
|
||||
| Location | Navigation bar (right side, after the language toggle) at **every** width — the control is not hidden at ≤1024px (Q14) — plus the Theme color row, the last row of the mobile sheet's Appearance group, while the sheet is open |
|
||||
| Control | Bar: `ThemePaletteMenu` (`src/components/layout/ThemePaletteMenu.tsx`), icon-only trigger — a 20px half-circle swatch (active palette's accent left, `--swatch-empty` right), no text and no chevron, name in `aria-label`, hint in `title` — opening the `#palette-menu` panel. Sheet: rendered by `MobileMenu.tsx` from `paletteIds` + `paletteMeta` as `.mobile-menu-swatch-option` buttons — the Mode/Language segmented-row shape, options drawn as colour icons |
|
||||
| Options | `red` (default) / `blue` — `src/data/palettes.ts` (`paletteIds`, `paletteMeta.label`/`hint`), written to `data-palette` on `<html>`; the sheet lists both, one colour icon each |
|
||||
| Chrome | The bar's three controls share `.nav-control` (44px bordered box, accent border + text on hover/open, one `:focus-visible`); `.nav-actions` order is mode → language → theme color → hamburger at every width, with a `@media (max-width: 420px)` guard so the row fits 320px |
|
||||
|
||||
Spec: `specs/v3/spec-v3-theme-palette-switch.md`.
|
||||
|
||||
### Mobile Menu Sheet
|
||||
|
||||
| Property | Value |
|
||||
|---|---|
|
||||
| Trigger | Hamburger button in the bar, ≤1024px |
|
||||
| Groups | Menu (6 routes) → Appearance (Mode, Language, Theme color) → Connect (GitHub, LinkedIn, email) |
|
||||
| Behaviour | `role="dialog"` + `aria-modal="true"`, Escape closes from any focus position, `#main-content` / `.footer` / `.back-to-top` are `inert` while open, body scroll locked |
|
||||
|
||||
Spec: `specs/v3/spec-v3-mobile-navigation.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -114,6 +135,8 @@ App
|
||||
| Tablet | 768–1023px | Adaptive grid |
|
||||
| Desktop | >= 1024px | Multi-column, wide layouts |
|
||||
|
||||
The navigation bar collapses to the hamburger + sheet at **≤1024px** (`src/App.css` `@media (max-width: 1024px)`), not at 768px. 768px governs single-column content layouts only.
|
||||
|
||||
---
|
||||
|
||||
## Accessibility
|
||||
|
||||
Reference in new issue
Block a user