feat(plugin): theme-aquarelle + hero variant (Phase 2.4 partie 1/2)
Registry : ajoute 2 plugins : - theme-aquarelle (carnet naturaliste XIXᵉ, mutual exclusion avec theme-guyane) - image-gallery-aquarelle-seed (14 aquarelles → MinIO + Media carbets démo) Hooks : - theme-guyane et theme-aquarelle se désactivent mutuellement au toggle ON via disableOtherTheme() CSS (globals.css) : - body[data-theme=aquarelle] : background papier teinté #faf5e9 + texture grain papier inline SVG + radial gradients ocres/canopy délavés - Surcharges automatiques des borders zinc/gray vers sépia délavé Layout : - PT_Serif (au lieu de Cormorant) en theme aquarelle, plus dense et encrée - data-theme = aquarelle prioritaire sur guyane si les deux sont enabled (défensif — le hook garantit normalement la mutual exclusion) Hero : - 2 versions dans le composant : guyane (existant, SVG CarbetRiver) et aquarelle (image MinIO 01-hero-fleuve-maroni.jpg en fond, voile crème, texte sépia, CTAs carrés sans rounded, hairlines, ornement de planche) - Branchement via getActiveTheme() - aquarelleUrl() helper qui construit l'URL MinIO publique Partie 2/2 (PR ultérieure) : upload des 14 images dans MinIO + hook image-gallery-aquarelle-seed + variantes aquarelle des autres composants (CarbetCard, ExperiencesSection, HowItWorksSection, CESection, Footer).
This commit is contained in:
parent
bb2fee7659
commit
c69c355f90
6 changed files with 187 additions and 6 deletions
|
|
@ -3,13 +3,20 @@ import { CarbetRiver } from "@/components/illustrations/CarbetRiver";
|
|||
import { LocaleSwitcher } from "@/components/LocaleSwitcher";
|
||||
import { isPluginEnabled } from "@/lib/plugins/server";
|
||||
import { t } from "@/lib/i18n/server";
|
||||
import { aquarelleUrl, getActiveTheme } from "@/lib/theme";
|
||||
|
||||
/**
|
||||
* Hero plein écran. Plugin `landing-hero`. Texte i18n via t() server.
|
||||
* Affiche le LocaleSwitcher en haut à droite si le plugin i18n est activé.
|
||||
* Selon le theme actif :
|
||||
* - aquarelle : illustration MinIO `01-hero-fleuve-maroni` en fond, ambiance
|
||||
* carnet de voyage, texte sépia sur papier teinté, ornement palmier en
|
||||
* coin et bordure hairline sépia
|
||||
* - guyane : SVG vectoriel CarbetRiver, palette tropicale moderne
|
||||
* - none : retombe sur le SVG
|
||||
*/
|
||||
export async function HeroSection() {
|
||||
const i18nOn = await isPluginEnabled("i18n-fr-en");
|
||||
const theme = await getActiveTheme();
|
||||
const eyebrow = await t("hero.eyebrow");
|
||||
const titleLine1 = await t("hero.titleLine1");
|
||||
const titleAccent = await t("hero.titleAccent");
|
||||
|
|
@ -17,6 +24,69 @@ export async function HeroSection() {
|
|||
const ctaDiscover = await t("hero.ctaDiscover");
|
||||
const ctaPropose = await t("hero.ctaPropose");
|
||||
|
||||
if (theme === "aquarelle") {
|
||||
return (
|
||||
<section className="relative isolate overflow-hidden border-b border-[#8c3d18]/25 bg-[#faf5e9]">
|
||||
<div
|
||||
className="absolute inset-0 -z-10 opacity-90"
|
||||
style={{
|
||||
backgroundImage: `url("${aquarelleUrl("01-hero-fleuve-maroni.jpg")}")`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center 60%",
|
||||
}}
|
||||
aria-hidden
|
||||
/>
|
||||
{/* voile crème pour lisibilité texte sépia sur l'aquarelle */}
|
||||
<div className="absolute inset-0 -z-10 bg-gradient-to-t from-[#faf5e9] via-[#faf5e9]/55 to-transparent" aria-hidden />
|
||||
<div className="absolute inset-0 -z-10 bg-gradient-to-r from-[#faf5e9]/85 via-transparent to-transparent" aria-hidden />
|
||||
|
||||
{i18nOn ? (
|
||||
<div className="absolute right-6 top-6 z-10 sm:right-8 lg:right-12">
|
||||
<LocaleSwitcher />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="mx-auto flex min-h-[78vh] max-w-6xl flex-col items-start justify-end gap-6 px-6 pb-16 pt-32 sm:px-8 sm:pb-20 sm:pt-40 lg:px-12">
|
||||
<span className="inline-flex items-center gap-2 rounded-none border-l border-r border-[#8c3d18]/40 bg-transparent px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8c3d18]">
|
||||
<span aria-hidden>~</span>
|
||||
{eyebrow}
|
||||
<span aria-hidden>~</span>
|
||||
</span>
|
||||
|
||||
<h1 className="max-w-3xl font-serif text-5xl font-normal leading-[1.05] tracking-tight text-[#2a2418] sm:text-6xl md:text-7xl lg:text-[5.5rem]">
|
||||
{titleLine1}
|
||||
<br />
|
||||
<span className="italic text-[#8c3d18]">{titleAccent}</span>.
|
||||
</h1>
|
||||
|
||||
<p className="max-w-xl font-serif text-lg leading-relaxed text-[#2a2418]/85">
|
||||
{subtitle}
|
||||
</p>
|
||||
|
||||
<div className="mt-2 flex flex-wrap items-center gap-3">
|
||||
<Link
|
||||
href="/carbets"
|
||||
className="rounded-none border border-[#8c3d18] bg-[#8c3d18] px-6 py-3 text-sm font-semibold uppercase tracking-wider text-[#faf5e9] transition hover:bg-[#5e2a10]"
|
||||
>
|
||||
{ctaDiscover}
|
||||
</Link>
|
||||
<Link
|
||||
href="/espace-hote"
|
||||
className="rounded-none border border-[#8c3d18]/50 bg-[#faf5e9]/70 px-6 py-3 text-sm font-medium uppercase tracking-wider text-[#2a2418] backdrop-blur-sm transition hover:bg-[#faf5e9]"
|
||||
>
|
||||
{ctaPropose}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<p className="mt-4 font-serif text-xs italic text-[#5e5e32]">
|
||||
— planche I, carnet d'expédition Karbé —
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// Theme guyane (default actuel) ou pas de theme
|
||||
return (
|
||||
<section className="relative isolate overflow-hidden bg-[var(--color-karbe-canopy-900)] text-[var(--color-karbe-bone)]">
|
||||
<div className="absolute inset-0 -z-10">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue