mirror of
https://github.com/rjNemo/vf-site
synced 2026-06-06 09:16:39 +00:00
feat(analytics): add apt prop to all Airbnb CTAs for clearer tracking (FR/EN, rates, detail, thank-you). style(home): increase apartment card image height on desktop (md:h-64).
2.2 KiB
2.2 KiB
Repository Guidelines
Project Structure & Modules
src/: Astro app —pages/(locale folders:fr/,en/),layouts/,styles/.src/i18n/routes.ts: central route manifest (hrefFor,siblingPath) for FR/EN slugs.public/: static assets and redirects (_redirects,assets/images,webfonts, etc.).docs/spec/website-revamp-spec.md: product/UX spec and release plan (source of truth).- Legacy:
lib/,pages/,data/(Python generator) — deprecated; do not modify.
Build, Test, and Development
- Setup:
corepack enable && pnpm i(usespnpm@10). - Dev server:
pnpm dev(Astro). Build:pnpm build. Preview:pnpm preview. - Deploy: Netlify (static). Redirects in
public/_redirects(root →/fr/). - Analytics: Plausible (
plausible("event", {props})).
Coding Style & Conventions
- UI: Tailwind CSS v4 (brand tokens:
--color-brand,--color-brand-600). - Icons:
lucide-astroinline SVGs; usetext-brandfor accent. - JS: vanilla only (no jQuery). Prefer lightweight patterns (e.g., scrollBy carousels).
- i18n: prefer
getRelativeLocaleUrl()fromastro:i18nfor links; usesiblingPath()for toggles when slugs differ. - Content slugs differ by locale (e.g., FR
avis↔ ENreviews) — never hardcode.
Testing Guidelines
- Sanity:
pnpm buildmust succeed. Thenpnpm previewfor visual QA. - Check: FR/EN toggles, redirects (
/ → /fr/), forms (Netlify), and analytics events. - Accessibility: keyboard nav for mobile menu; color contrast for brand accents.
Commit & Pull Requests
- Conventional Commits (examples):
feat(home): hero CTA,fix(i18n): toggle sibling path. - PRs should include: build passing, screenshots (FR/EN), and spec updates when needed.
- Keep focused and small; avoid mixing refactors with features.
Revamp Spec & Phases
- Branch:
revamp/website-spec. Spec:docs/spec/website-revamp-spec.md. - Phase 1 (current): FR core pages, inquiry form, i18n scaffolding.
- Phase 2: EN pages + gallery, translated reviews.
- Phase 3: Policies, analytics KPIs, performance polish (WebP/srcset, Lighthouse).
Notes
- Do not commit
dist/. Assets live inpublic/assets/.... - Use the route manifest for any new pages/links; add entries for new slugs.