0f6860f1ae
- new src/hooks/ui/useIsMobile.ts (matchMedia + useSyncExternalStore) replacing the resize-handler hook inlined inside pages/site/page.tsx - new src/hooks/ui/usePrefersReducedMotion.ts - new src/data/site/dialogueIds.ts so site and intro components stop carrying hard-coded narrator IDs - siteConfig: add SITE_BACKGROUND_STYLE shared by SiteLayout and SiteMobileBlocker, rename forcedName to presetPlayerName, fix the swapped id/label pairing on situation cards - useSiteStore: rename selectedExperience/Situation to *Index so the stored value (an array index) is obvious in callers - audioConfig: drop dead AUDIO_PATHS placeholders - propagate the renames and SITE_BACKGROUND_STYLE through SiteLayout, SiteWelcomeScreen, SiteSituationScreen and pages/site/page.tsx
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
import type { CSSProperties } from "react";
|
|
|
|
const BACKGROUND_IMAGE = "/assets/bg-site.png";
|
|
|
|
export const SITE_CONFIG = {
|
|
backgroundImage: BACKGROUND_IMAGE,
|
|
presetPlayerName: "Danyl",
|
|
} as const;
|
|
|
|
/**
|
|
* Shared background style used by SiteLayout and SiteMobileBlocker.
|
|
*/
|
|
export const SITE_BACKGROUND_STYLE: CSSProperties = {
|
|
backgroundColor: "#87CEEB",
|
|
backgroundImage: `url(${BACKGROUND_IMAGE})`,
|
|
backgroundSize: "cover",
|
|
backgroundPosition: "center",
|
|
backgroundRepeat: "no-repeat",
|
|
};
|
|
|
|
export interface SiteCardConfig {
|
|
id: string;
|
|
label: string;
|
|
imagePath?: string;
|
|
disabled: boolean;
|
|
}
|
|
|
|
/**
|
|
* Cards for screen 1: "Choisissez une expérience"
|
|
*/
|
|
export const EXPERIENCE_CARDS: readonly SiteCardConfig[] = [
|
|
{ id: "exp-fabrik", label: "La Fabrik", disabled: false },
|
|
{ id: "exp-ferme", label: "La Ferme verticale", disabled: true },
|
|
{ id: "exp-energie", label: "La Zone d'énergie", disabled: true },
|
|
{ id: "exp-ecole", label: "L'École", disabled: true },
|
|
];
|
|
|
|
/**
|
|
* Cards for screen 2: "Quelle est votre situation ?"
|
|
*/
|
|
export const SITUATION_CARDS: readonly SiteCardConfig[] = [
|
|
{ id: "sit-sans-domicile", label: "Sans domicile fixe", disabled: true },
|
|
{ id: "sit-refugie-guerre", label: "Réfugié.e de guerre", disabled: true },
|
|
{
|
|
id: "sit-refugie-climat",
|
|
label: "Réfugié.e climatique",
|
|
disabled: false,
|
|
},
|
|
{ id: "sit-autre", label: "Autre", disabled: true },
|
|
];
|