g-but and Claude Sonnet 4.6
785b923e25
feat(ui): portal nav overhaul, clinical goals UI, check-in, accessibility + readability fixes
...
Navigation & layout:
- PortalNav: icon sidebar with 4 groups, active state with teal left border
- BottomNav: fixed mobile bottom tab bar (5 items, safe-area-inset-bottom)
- NavBreadcrumb: route-aware header breadcrumb
- UserDropdown: escape key close, aria-expanded ring, quick check-in link
Portal features:
- Check-in page: 1-10 scale for mood/energy/sleep/stress
- PatientGoalsCard: admin goal CRUD with progress bars
- Dashboard: active clinical goals section
- ProfileCompletenessBar uses profileCompletenessColor()
- Admin patient detail decomposed into card components
Accessibility & readability:
- html font-size 112% - raises all rem values ~12% site-wide
- --muted darkened to #71727c (WCAG AA 4.5:1 on white)
- Hero eyebrow 0.6rem to 0.72rem, pill 0.58 to 0.68rem, sub contrast fixed
- Nav links 0.68 to 0.75rem
- LanguageSwitcher: pill container, mobile visible (was hidden), 0.62 to 0.72rem
- scaleBtn min-height 2.75rem (44px touch target)
Hero fix: .heroR justify-content flex-end (was center) aligns both columns
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-15 11:00:05 +02:00
g-but and Claude Sonnet 4.6
e55651b4b2
feat(i18n): full Swiss multilingual support (de/fr/it/en)
...
Infrastructure
- next-intl v4: routing config, request config, createNextIntlPlugin
- proxy.ts: merged next-intl middleware with existing auth guard — portal/admin
paths bypass locale routing; marketing+auth go through intlMiddleware
- lib/i18n/navigation.ts: locale-aware Link, useRouter, usePathname
Routing
- app/[locale]/(auth)/: login, register, forgot-password, reset-password
fully translated, locale-prefixed (e.g. /de/login, /fr/login)
- app/[locale]/page.tsx: marketing landing under each locale
- app/layout.tsx: lang attribute from NEXT_LOCALE cookie
- app/page.tsx: safety-net redirect to /de
Translation files
- messages/{de,fr,it,en}.json: 254 keys across 15 sections — nav, hero,
impactStats, pillars, approach, pathway, diagnostics, sylClock,
psychedelicReadiness, addiction, programs, team, cta, footer, auth
- de: formal Sie, Swiss Hochdeutsch (no ß → ss)
- fr: formal vous, Swiss French register
- it: formal Lei, standard Italian for Ticino audience
- Protected from translation: brand names, prices, citations, medical acronyms
Components
- All 14 section components → async server components using getTranslations()
- Config arrays reduced to structural/non-translatable data (icons, prices,
featured flags, step numbers, initials)
- Text content via t.raw() for arrays, t() for scalars
- Nav: useTranslations + LanguageSwitcher + locale-aware Link
- Auth pages: useTranslations replacing all hardcoded strings
- LanguageSwitcher: DE/FR/IT/EN pill buttons, hides on mobile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-14 16:31:40 +02:00