Pages Accueil & A propos
This commit is contained in:
+6
-1
@@ -1,14 +1,19 @@
|
||||
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||
import { MainLayout } from "./layouts/MainLayout";
|
||||
import Home from "./pages/Home";
|
||||
import About from "./pages/About";
|
||||
import Events from "./pages/Events";
|
||||
import Historic from "./pages/Historic";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<MainLayout />}>
|
||||
<Route index element={<About />} />
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="a-propos" element={<About />} />
|
||||
<Route path="evenements" element={<Events />} />
|
||||
<Route path="historique" element={<Historic />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
import React, { useRef, useEffect } from "react";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
|
||||
interface AnimatedContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
children: React.ReactNode;
|
||||
container?: Element | string | null;
|
||||
distance?: number;
|
||||
direction?: "vertical" | "horizontal";
|
||||
reverse?: boolean;
|
||||
duration?: number;
|
||||
ease?: string;
|
||||
initialOpacity?: number;
|
||||
animateOpacity?: boolean;
|
||||
scale?: number;
|
||||
threshold?: number;
|
||||
delay?: number;
|
||||
disappearAfter?: number;
|
||||
disappearDuration?: number;
|
||||
disappearEase?: string;
|
||||
onComplete?: () => void;
|
||||
onDisappearanceComplete?: () => void;
|
||||
}
|
||||
|
||||
const AnimatedContent: React.FC<AnimatedContentProps> = ({
|
||||
children,
|
||||
container,
|
||||
distance = 100,
|
||||
direction = "vertical",
|
||||
reverse = false,
|
||||
duration = 0.8,
|
||||
ease = "power3.out",
|
||||
initialOpacity = 0,
|
||||
animateOpacity = true,
|
||||
scale = 1,
|
||||
threshold = 0.1,
|
||||
delay = 0,
|
||||
disappearAfter = 0,
|
||||
disappearDuration = 0.5,
|
||||
disappearEase = "power3.in",
|
||||
onComplete,
|
||||
onDisappearanceComplete,
|
||||
className = "",
|
||||
...props
|
||||
}) => {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const el = ref.current;
|
||||
if (!el) return;
|
||||
|
||||
let scrollerTarget: Element | string | null =
|
||||
container || document.getElementById("snap-main-container") || null;
|
||||
|
||||
if (typeof scrollerTarget === "string") {
|
||||
scrollerTarget = document.querySelector(scrollerTarget);
|
||||
}
|
||||
|
||||
const axis = direction === "horizontal" ? "x" : "y";
|
||||
const offset = reverse ? -distance : distance;
|
||||
const startPct = (1 - threshold) * 100;
|
||||
|
||||
gsap.set(el, {
|
||||
[axis]: offset,
|
||||
scale,
|
||||
opacity: animateOpacity ? initialOpacity : 1,
|
||||
visibility: "visible",
|
||||
});
|
||||
|
||||
const tl = gsap.timeline({
|
||||
paused: true,
|
||||
delay,
|
||||
onComplete: () => {
|
||||
if (onComplete) onComplete();
|
||||
if (disappearAfter > 0) {
|
||||
gsap.to(el, {
|
||||
[axis]: reverse ? distance : -distance,
|
||||
scale: 0.8,
|
||||
opacity: animateOpacity ? initialOpacity : 0,
|
||||
delay: disappearAfter,
|
||||
duration: disappearDuration,
|
||||
ease: disappearEase,
|
||||
onComplete: () => onDisappearanceComplete?.(),
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
tl.to(el, {
|
||||
[axis]: 0,
|
||||
scale: 1,
|
||||
opacity: 1,
|
||||
duration,
|
||||
ease,
|
||||
});
|
||||
|
||||
const st = ScrollTrigger.create({
|
||||
trigger: el,
|
||||
scroller: scrollerTarget || window,
|
||||
start: `top ${startPct}%`,
|
||||
once: true,
|
||||
onEnter: () => tl.play(),
|
||||
});
|
||||
|
||||
return () => {
|
||||
st.kill();
|
||||
tl.kill();
|
||||
};
|
||||
}, [
|
||||
container,
|
||||
distance,
|
||||
direction,
|
||||
reverse,
|
||||
duration,
|
||||
ease,
|
||||
initialOpacity,
|
||||
animateOpacity,
|
||||
scale,
|
||||
threshold,
|
||||
delay,
|
||||
disappearAfter,
|
||||
disappearDuration,
|
||||
disappearEase,
|
||||
onComplete,
|
||||
onDisappearanceComplete,
|
||||
]);
|
||||
|
||||
return (
|
||||
<div ref={ref} className={`invisible ${className}`} {...props}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AnimatedContent;
|
||||
@@ -1,80 +0,0 @@
|
||||
import { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export const Navbar = () => {
|
||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<nav className="bg-primary text-white shadow-lg z-50 relative font-semibold">
|
||||
<div className="max-w-7xl mx-auto px-6 flex justify-between items-center h-20">
|
||||
{/* LOGO */}
|
||||
<Link to="/" className="flex items-center gap-3 group">
|
||||
<div className="w-12 h-12 bg-white rounded-full flex items-center justify-center text-primary font-bold text-2xl group-hover:scale-110 transition-transform">
|
||||
UA
|
||||
</div>
|
||||
<span className="uppercase tracking-widest text-lg">
|
||||
Coeur UA PAM
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
{/* MENU */}
|
||||
<ul className="hidden md:flex items-center space-x-10">
|
||||
{/* Dropdown Evenements */}
|
||||
<li
|
||||
className="relative h-20 flex items-center cursor-pointer"
|
||||
onMouseEnter={() => setIsDropdownOpen(true)}
|
||||
onMouseLeave={() => setIsDropdownOpen(false)}
|
||||
>
|
||||
<span className="hover:text-hover-nav transition-colors uppercase">
|
||||
Événements
|
||||
</span>
|
||||
|
||||
{isDropdownOpen && (
|
||||
<ul className="absolute top-20 left-0 w-64 bg-primary border-t-2 border-hover-nav shadow-2xl py-2 animate-in fade-in slide-in-from-top-2">
|
||||
<li>
|
||||
<Link
|
||||
to="/evenements/octobre-rose"
|
||||
className="block px-6 py-3 hover:bg-blue-accent hover:text-hover-nav transition-colors"
|
||||
>
|
||||
Octobre Rose
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to="/evenements/noel"
|
||||
className="block px-6 py-3 hover:bg-blue-accent hover:text-hover-nav transition-colors"
|
||||
>
|
||||
Noël des Ukrainiens
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
)}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<Link
|
||||
to="/historique"
|
||||
className="hover:text-hover-nav transition-colors uppercase"
|
||||
>
|
||||
Historique
|
||||
</Link>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<Link
|
||||
to="/a-propos"
|
||||
className="text-hover-nav border-b-2 border-hover-nav pb-1 uppercase"
|
||||
>
|
||||
À propos
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{/* BOUTON DON (Action) */}
|
||||
<button className="bg-heading hover:bg-heading-accent text-white px-6 py-2 rounded-sm transition-all shadow-md uppercase text-sm">
|
||||
Soutenir
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,528 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { gsap } from "gsap";
|
||||
|
||||
export type PillNavItem = {
|
||||
label: string;
|
||||
href: string;
|
||||
ariaLabel?: string;
|
||||
};
|
||||
|
||||
export interface PillNavProps {
|
||||
logo: string;
|
||||
logoAlt?: string;
|
||||
items: PillNavItem[];
|
||||
activeHref?: string;
|
||||
className?: string;
|
||||
ease?: string;
|
||||
baseColor?: string;
|
||||
pillColor?: string;
|
||||
hoveredPillTextColor?: string;
|
||||
pillTextColor?: string;
|
||||
onMobileMenuClick?: () => void;
|
||||
initialLoadAnimation?: boolean;
|
||||
}
|
||||
|
||||
const PillNav: React.FC<PillNavProps> = ({
|
||||
logo,
|
||||
logoAlt = "Logo",
|
||||
items,
|
||||
activeHref,
|
||||
className = "",
|
||||
ease = "power3.easeOut",
|
||||
baseColor = "#1a247f",
|
||||
pillColor = "#dfbe85",
|
||||
hoveredPillTextColor = "#ffffff",
|
||||
pillTextColor,
|
||||
onMobileMenuClick,
|
||||
initialLoadAnimation = true,
|
||||
}) => {
|
||||
const resolvedPillTextColor = pillTextColor ?? baseColor;
|
||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||
|
||||
const circleRefs = useRef<Array<HTMLSpanElement | null>>([]);
|
||||
const tlRefs = useRef<Array<gsap.core.Timeline | null>>([]);
|
||||
const activeTweenRefs = useRef<Array<gsap.core.Tween | null>>([]);
|
||||
|
||||
const logoImgRef = useRef<HTMLImageElement | null>(null);
|
||||
const logoTweenRef = useRef<gsap.core.Tween | null>(null);
|
||||
const hamburgerRef = useRef<HTMLButtonElement | null>(null);
|
||||
const mobileMenuRef = useRef<HTMLDivElement | null>(null);
|
||||
const navItemsRef = useRef<HTMLDivElement | null>(null);
|
||||
const logoRef = useRef<HTMLAnchorElement | HTMLElement | null>(null);
|
||||
|
||||
const isInitialMount = useRef(true);
|
||||
|
||||
// --- 1. Gestion du Menu Mobile avec GSAP ---
|
||||
useEffect(() => {
|
||||
const menu = mobileMenuRef.current;
|
||||
const hamburger = hamburgerRef.current;
|
||||
const listItems = menu?.querySelectorAll("li");
|
||||
|
||||
// Éviter l'animation au premier chargement
|
||||
if (isInitialMount.current) {
|
||||
if (menu) gsap.set(menu, { visibility: "hidden", opacity: 0, scaleY: 0 });
|
||||
if (listItems) gsap.set(listItems, { opacity: 0, y: 20 });
|
||||
isInitialMount.current = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isMobileMenuOpen) {
|
||||
// --- ANIMATION D'OUVERTURE ---
|
||||
if (hamburger) {
|
||||
const lines = hamburger.querySelectorAll(".hamburger-line");
|
||||
gsap.to(lines[0], { rotation: 45, y: 3, duration: 0.3, ease });
|
||||
gsap.to(lines[1], { rotation: -45, y: -3, duration: 0.3, ease });
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
gsap.set(menu, { visibility: "visible" });
|
||||
// Le fond se déroule depuis le haut
|
||||
gsap.fromTo(
|
||||
menu,
|
||||
{ opacity: 0, scaleY: 0 },
|
||||
{
|
||||
opacity: 1,
|
||||
scaleY: 1,
|
||||
duration: 0.4,
|
||||
ease,
|
||||
transformOrigin: "top center",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
if (listItems) {
|
||||
// Les liens apparaissent en cascade depuis le bas
|
||||
gsap.fromTo(
|
||||
listItems,
|
||||
{ opacity: 0, y: 20 },
|
||||
{ opacity: 1, y: 0, duration: 0.4, stagger: 0.1, delay: 0.15, ease },
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// --- ANIMATION DE FERMETURE ---
|
||||
if (hamburger) {
|
||||
const lines = hamburger.querySelectorAll(".hamburger-line");
|
||||
gsap.to(lines[0], { rotation: 0, y: 0, duration: 0.3, ease });
|
||||
gsap.to(lines[1], { rotation: 0, y: 0, duration: 0.3, ease });
|
||||
}
|
||||
|
||||
if (listItems) {
|
||||
// Les liens disparaissent vers le haut d'abord
|
||||
gsap.to(listItems, {
|
||||
opacity: 0,
|
||||
y: -10,
|
||||
duration: 0.2,
|
||||
stagger: 0.05,
|
||||
ease,
|
||||
});
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
// Le fond se rétracte après les liens
|
||||
gsap.to(menu, {
|
||||
opacity: 0,
|
||||
scaleY: 0,
|
||||
duration: 0.3,
|
||||
delay: 0.2, // On attend que les liens disparaissent
|
||||
ease,
|
||||
transformOrigin: "top center",
|
||||
onComplete: () => {
|
||||
gsap.set(menu, { visibility: "hidden" });
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [isMobileMenuOpen, ease]);
|
||||
|
||||
// --- 2. Mise en page Desktop ---
|
||||
useEffect(() => {
|
||||
const layout = () => {
|
||||
circleRefs.current.forEach((circle) => {
|
||||
if (!circle?.parentElement) return;
|
||||
|
||||
const pill = circle.parentElement as HTMLElement;
|
||||
const rect = pill.getBoundingClientRect();
|
||||
const { width: w, height: h } = rect;
|
||||
const R = ((w * w) / 4 + h * h) / (2 * h);
|
||||
const D = Math.ceil(2 * R) + 2;
|
||||
const delta =
|
||||
Math.ceil(R - Math.sqrt(Math.max(0, R * R - (w * w) / 4))) + 1;
|
||||
const originY = D - delta;
|
||||
|
||||
circle.style.width = `${D}px`;
|
||||
circle.style.height = `${D}px`;
|
||||
circle.style.bottom = `-${delta}px`;
|
||||
|
||||
gsap.set(circle, {
|
||||
xPercent: -50,
|
||||
scale: 0,
|
||||
transformOrigin: `50% ${originY}px`,
|
||||
});
|
||||
|
||||
const label = pill.querySelector<HTMLElement>(".pill-label");
|
||||
const white = pill.querySelector<HTMLElement>(".pill-label-hover");
|
||||
|
||||
if (label) gsap.set(label, { y: 0 });
|
||||
if (white) gsap.set(white, { y: h + 12, opacity: 0 });
|
||||
|
||||
const index = circleRefs.current.indexOf(circle);
|
||||
if (index === -1) return;
|
||||
|
||||
tlRefs.current[index]?.kill();
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
|
||||
tl.to(
|
||||
circle,
|
||||
{ scale: 1.2, xPercent: -50, duration: 2, ease, overwrite: "auto" },
|
||||
0,
|
||||
);
|
||||
|
||||
if (label) {
|
||||
tl.to(
|
||||
label,
|
||||
{ y: -(h + 8), duration: 2, ease, overwrite: "auto" },
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
||||
if (white) {
|
||||
gsap.set(white, { y: Math.ceil(h + 100), opacity: 0 });
|
||||
tl.to(
|
||||
white,
|
||||
{ y: 0, opacity: 1, duration: 2, ease, overwrite: "auto" },
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
||||
tlRefs.current[index] = tl;
|
||||
});
|
||||
};
|
||||
|
||||
layout();
|
||||
const onResize = () => layout();
|
||||
window.addEventListener("resize", onResize);
|
||||
|
||||
if (document.fonts) {
|
||||
document.fonts.ready.then(layout).catch(() => {});
|
||||
}
|
||||
|
||||
if (initialLoadAnimation) {
|
||||
const logo = logoRef.current;
|
||||
const navItems = navItemsRef.current;
|
||||
if (logo) {
|
||||
gsap.set(logo, { scale: 0 });
|
||||
gsap.to(logo, { scale: 1, duration: 0.6, ease });
|
||||
}
|
||||
if (navItems) {
|
||||
gsap.set(navItems, { width: 0, overflow: "hidden" });
|
||||
gsap.to(navItems, { width: "auto", duration: 0.6, ease });
|
||||
}
|
||||
}
|
||||
|
||||
return () => window.removeEventListener("resize", onResize);
|
||||
}, [items, ease, initialLoadAnimation]);
|
||||
|
||||
const handleEnter = (i: number) => {
|
||||
const tl = tlRefs.current[i];
|
||||
if (!tl) return;
|
||||
activeTweenRefs.current[i]?.kill();
|
||||
activeTweenRefs.current[i] = tl.tweenTo(tl.duration(), {
|
||||
duration: 0.3,
|
||||
ease,
|
||||
overwrite: "auto",
|
||||
});
|
||||
};
|
||||
|
||||
const handleLeave = (i: number) => {
|
||||
const tl = tlRefs.current[i];
|
||||
if (!tl) return;
|
||||
activeTweenRefs.current[i]?.kill();
|
||||
activeTweenRefs.current[i] = tl.tweenTo(0, {
|
||||
duration: 0.2,
|
||||
ease,
|
||||
overwrite: "auto",
|
||||
});
|
||||
};
|
||||
|
||||
const handleLogoEnter = () => {
|
||||
const img = logoImgRef.current;
|
||||
if (!img) return;
|
||||
logoTweenRef.current?.kill();
|
||||
gsap.set(img, { rotate: 0 });
|
||||
logoTweenRef.current = gsap.to(img, {
|
||||
rotate: 360,
|
||||
duration: 0.2,
|
||||
ease,
|
||||
overwrite: "auto",
|
||||
});
|
||||
};
|
||||
|
||||
// --- Simplification : gère uniquement l'état React ---
|
||||
const toggleMobileMenu = () => {
|
||||
setIsMobileMenuOpen((prev) => !prev);
|
||||
onMobileMenuClick?.();
|
||||
};
|
||||
|
||||
const closeMobileMenu = () => {
|
||||
setIsMobileMenuOpen(false);
|
||||
};
|
||||
|
||||
const isExternalLink = (href: string) =>
|
||||
href.startsWith("http://") ||
|
||||
href.startsWith("https://") ||
|
||||
href.startsWith("//") ||
|
||||
href.startsWith("mailto:") ||
|
||||
href.startsWith("tel:") ||
|
||||
href.startsWith("#");
|
||||
|
||||
const isRouterLink = (href?: string) => href && !isExternalLink(href);
|
||||
|
||||
const cssVars = {
|
||||
["--base"]: baseColor,
|
||||
["--pill-bg"]: pillColor,
|
||||
["--hover-text"]: hoveredPillTextColor,
|
||||
["--pill-text"]: resolvedPillTextColor,
|
||||
["--nav-h"]: "42px",
|
||||
["--logo"]: "40px",
|
||||
["--pill-pad-x"]: "18px",
|
||||
["--pill-gap"]: "3px",
|
||||
} as React.CSSProperties;
|
||||
|
||||
return (
|
||||
<div className="relative z-50 w-full md:w-auto">
|
||||
<nav
|
||||
className={`relative z-1000 w-full md:w-max flex items-center justify-between md:justify-start box-border px-4 md:px-0 ${className}`}
|
||||
aria-label="Primary"
|
||||
style={cssVars}
|
||||
>
|
||||
{isRouterLink(items?.[0]?.href) ? (
|
||||
<Link
|
||||
to={items[0].href}
|
||||
aria-label="Home"
|
||||
onMouseEnter={handleLogoEnter}
|
||||
onClick={closeMobileMenu} // Ferme le menu si on clique sur le logo depuis le mobile
|
||||
role="menuitem"
|
||||
ref={(el) => {
|
||||
logoRef.current = el;
|
||||
}}
|
||||
className="rounded-full p-2 inline-flex items-center justify-center overflow-hidden"
|
||||
style={{
|
||||
width: "var(--nav-h)",
|
||||
height: "var(--nav-h)",
|
||||
background: "var(--base)",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={logo}
|
||||
alt={logoAlt}
|
||||
ref={logoImgRef}
|
||||
className="w-full h-full object-cover block"
|
||||
/>
|
||||
</Link>
|
||||
) : (
|
||||
<a
|
||||
href={items?.[0]?.href || "#"}
|
||||
aria-label="Home"
|
||||
onMouseEnter={handleLogoEnter}
|
||||
onClick={closeMobileMenu}
|
||||
ref={(el) => {
|
||||
logoRef.current = el;
|
||||
}}
|
||||
className="rounded-full p-2 inline-flex items-center justify-center overflow-hidden"
|
||||
style={{
|
||||
width: "var(--nav-h)",
|
||||
height: "var(--nav-h)",
|
||||
background: "var(--base)",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={logo}
|
||||
alt={logoAlt}
|
||||
ref={logoImgRef}
|
||||
className="w-full h-full object-cover block"
|
||||
/>
|
||||
</a>
|
||||
)}
|
||||
|
||||
{/* Desktop Nav */}
|
||||
<div
|
||||
ref={navItemsRef}
|
||||
className="relative items-center rounded-full hidden md:flex ml-2"
|
||||
style={{ height: "var(--nav-h)", background: "var(--base)" }}
|
||||
>
|
||||
<ul
|
||||
role="menubar"
|
||||
className="list-none flex items-stretch m-0 p-0.75 h-full"
|
||||
style={{ gap: "var(--pill-gap)" }}
|
||||
>
|
||||
{items.map((item, i) => {
|
||||
const isActive = activeHref === item.href;
|
||||
const pillStyle: React.CSSProperties = {
|
||||
background: "var(--pill-bg)",
|
||||
color: "var(--pill-text)",
|
||||
paddingLeft: "var(--pill-pad-x)",
|
||||
paddingRight: "var(--pill-pad-x)",
|
||||
};
|
||||
|
||||
const PillContent = (
|
||||
<>
|
||||
<span
|
||||
className="hover-circle absolute left-1/2 bottom-0 rounded-full z-1 block pointer-events-none"
|
||||
style={{
|
||||
background: "var(--color-primary)",
|
||||
willChange: "transform",
|
||||
}}
|
||||
aria-hidden="true"
|
||||
ref={(el) => {
|
||||
circleRefs.current[i] = el;
|
||||
}}
|
||||
/>
|
||||
<span className="label-stack relative inline-block leading-none z-2">
|
||||
<span
|
||||
className="pill-label relative z-2 inline-block leading-none"
|
||||
style={{ willChange: "transform" }}
|
||||
>
|
||||
{item.label}
|
||||
</span>
|
||||
<span
|
||||
className="pill-label-hover absolute left-0 top-0 z-3 inline-block"
|
||||
style={{
|
||||
color: "var(--hover-text)",
|
||||
willChange: "transform, opacity",
|
||||
}}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{item.label}
|
||||
</span>
|
||||
</span>
|
||||
{isActive && (
|
||||
<span
|
||||
className="absolute left-1/2 -bottom-1.5 -translate-x-1/2 w-3 h-3 rounded-full z-4"
|
||||
style={{ background: "var(--color-primary)" }}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
const basePillClasses =
|
||||
"relative overflow-hidden inline-flex items-center justify-center h-full no-underline rounded-full box-border font-semibold text-[16px] leading-[0] uppercase tracking-[0.2px] whitespace-nowrap cursor-pointer px-0";
|
||||
|
||||
return (
|
||||
<li key={item.href} role="none" className="flex h-full">
|
||||
{isRouterLink(item.href) ? (
|
||||
<Link
|
||||
role="menuitem"
|
||||
to={item.href}
|
||||
className={basePillClasses}
|
||||
style={pillStyle}
|
||||
aria-label={item.ariaLabel || item.label}
|
||||
onMouseEnter={() => handleEnter(i)}
|
||||
onMouseLeave={() => handleLeave(i)}
|
||||
>
|
||||
{PillContent}
|
||||
</Link>
|
||||
) : (
|
||||
<a
|
||||
role="menuitem"
|
||||
href={item.href}
|
||||
className={basePillClasses}
|
||||
style={pillStyle}
|
||||
aria-label={item.ariaLabel || item.label}
|
||||
onMouseEnter={() => handleEnter(i)}
|
||||
onMouseLeave={() => handleLeave(i)}
|
||||
>
|
||||
{PillContent}
|
||||
</a>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Bouton Hamburger */}
|
||||
<button
|
||||
ref={hamburgerRef}
|
||||
onClick={toggleMobileMenu}
|
||||
aria-label="Toggle menu"
|
||||
aria-expanded={isMobileMenuOpen}
|
||||
className="md:hidden rounded-full border-0 flex flex-col items-center justify-center gap-1 cursor-pointer p-0 relative"
|
||||
style={{
|
||||
width: "var(--nav-h)",
|
||||
height: "var(--nav-h)",
|
||||
background: "var(--base)",
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="hamburger-line w-4 h-0.5 rounded origin-center transition-all duration-200"
|
||||
style={{ background: "var(--color-primary)" }}
|
||||
/>
|
||||
<span
|
||||
className="hamburger-line w-4 h-0.5 rounded origin-center transition-all duration-200"
|
||||
style={{ background: "var(--color-primary)" }}
|
||||
/>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
{/* Menu Mobile Fullscreen */}
|
||||
<div
|
||||
ref={mobileMenuRef}
|
||||
className="md:hidden fixed top-0 left-0 w-full z-990 pt-15 rounded-t-none rounded-b-[30px] shadow-2xl pointer-events-auto"
|
||||
style={{ ...cssVars, background: "var(--base)" }}
|
||||
>
|
||||
<ul className="list-none m-0 flex flex-col gap-2">
|
||||
{items.map((item) => {
|
||||
const defaultStyle: React.CSSProperties = {
|
||||
background: "var(--pill-bg)",
|
||||
color: "var(--pill-text)",
|
||||
};
|
||||
|
||||
const hoverIn = (e: React.MouseEvent<HTMLAnchorElement>) => {
|
||||
e.currentTarget.style.background = "var(--color-bg-2)";
|
||||
e.currentTarget.style.color = "var(--color-heading-accent)";
|
||||
};
|
||||
const hoverOut = (e: React.MouseEvent<HTMLAnchorElement>) => {
|
||||
e.currentTarget.style.background = "var(--pill-bg)";
|
||||
e.currentTarget.style.color = "var(--pill-text)";
|
||||
};
|
||||
|
||||
const linkClasses =
|
||||
"block py-4 px-6 text-[16px] font-semibold rounded-b-[20px] transition-all duration-200 uppercase tracking-wide text-center shadow-md";
|
||||
|
||||
return (
|
||||
<li key={item.href}>
|
||||
{isRouterLink(item.href) ? (
|
||||
<Link
|
||||
to={item.href}
|
||||
className={linkClasses}
|
||||
style={defaultStyle}
|
||||
onMouseEnter={hoverIn}
|
||||
onMouseLeave={hoverOut}
|
||||
onClick={closeMobileMenu} // On appelle bien notre fonction qui modifie l'état et lance l'animation de fermeture
|
||||
>
|
||||
{item.label}
|
||||
</Link>
|
||||
) : (
|
||||
<a
|
||||
href={item.href}
|
||||
className={linkClasses}
|
||||
style={defaultStyle}
|
||||
onMouseEnter={hoverIn}
|
||||
onMouseLeave={hoverOut}
|
||||
onClick={closeMobileMenu}
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PillNav;
|
||||
@@ -1,124 +0,0 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import gsap from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
import { useGSAP } from "@gsap/react";
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
|
||||
interface SplitTextProps {
|
||||
text: string;
|
||||
className?: string;
|
||||
delay?: number;
|
||||
duration?: number;
|
||||
ease?: string;
|
||||
// On retire splitType s'il n'est pas utilisé pour éviter le warning "unused"
|
||||
from?: gsap.TweenVars;
|
||||
to?: gsap.TweenVars;
|
||||
threshold?: number;
|
||||
rootMargin?: string;
|
||||
textAlign?: "left" | "center" | "right" | "justify";
|
||||
tag?: keyof React.JSX.IntrinsicElements; // Correction du namespace
|
||||
onLetterAnimationComplete?: () => void;
|
||||
}
|
||||
|
||||
const SplitText: React.FC<SplitTextProps> = ({
|
||||
text,
|
||||
className = "",
|
||||
delay = 50,
|
||||
duration = 0.5,
|
||||
ease = "back.out",
|
||||
from = { opacity: 0, y: 40 },
|
||||
to = { opacity: 1, y: 0 },
|
||||
threshold = 0.1,
|
||||
rootMargin = "0px",
|
||||
textAlign = "left",
|
||||
tag = "p",
|
||||
onLetterAnimationComplete,
|
||||
}) => {
|
||||
// On remplace 'any' par un type générique d'élément HTML
|
||||
const ref = useRef<HTMLElement>(null);
|
||||
const animationCompletedRef = useRef(false);
|
||||
const onCompleteRef = useRef(onLetterAnimationComplete);
|
||||
const [fontsLoaded, setFontsLoaded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
onCompleteRef.current = onLetterAnimationComplete;
|
||||
}, [onLetterAnimationComplete]);
|
||||
|
||||
useEffect(() => {
|
||||
let isMounted = true;
|
||||
|
||||
const handleLoad = () => {
|
||||
if (isMounted) setFontsLoaded(true);
|
||||
};
|
||||
|
||||
if (document.fonts.status === "loaded") {
|
||||
Promise.resolve().then(handleLoad);
|
||||
} else {
|
||||
document.fonts.ready.then(handleLoad);
|
||||
}
|
||||
|
||||
return () => {
|
||||
isMounted = false;
|
||||
};
|
||||
}, []);
|
||||
|
||||
useGSAP(
|
||||
() => {
|
||||
if (!ref.current || !text || !fontsLoaded) return;
|
||||
if (animationCompletedRef.current) return;
|
||||
|
||||
const el = ref.current;
|
||||
|
||||
const startPct = (1 - threshold) * 100;
|
||||
const marginMatch = /^(-?\d+(?:\.\d+)?)(px|em|rem|%)?$/.exec(rootMargin);
|
||||
const marginValue = marginMatch ? parseFloat(marginMatch[1]) : 0;
|
||||
const marginUnit = marginMatch ? marginMatch[2] || "px" : "px";
|
||||
const sign =
|
||||
marginValue === 0
|
||||
? ""
|
||||
: marginValue < 0
|
||||
? `-=${Math.abs(marginValue)}${marginUnit}`
|
||||
: `+=${marginValue}${marginUnit}`;
|
||||
const start = `top ${startPct}%${sign}`;
|
||||
|
||||
gsap.fromTo(
|
||||
el,
|
||||
{ ...from },
|
||||
{
|
||||
...to,
|
||||
duration,
|
||||
ease,
|
||||
stagger: delay / 1000,
|
||||
scrollTrigger: {
|
||||
trigger: el,
|
||||
start,
|
||||
once: true,
|
||||
},
|
||||
onComplete: () => {
|
||||
animationCompletedRef.current = true;
|
||||
onCompleteRef.current?.();
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
{ dependencies: [text, fontsLoaded, delay, duration, ease], scope: ref },
|
||||
);
|
||||
|
||||
const style: React.CSSProperties = {
|
||||
textAlign,
|
||||
wordWrap: "break-word",
|
||||
willChange: "transform, opacity",
|
||||
};
|
||||
|
||||
// Correction du type 'any' pour le Tag dynamique
|
||||
const TagName = tag as React.ElementType;
|
||||
|
||||
return (
|
||||
<TagName ref={ref} style={style} className={`inline-block ${className}`}>
|
||||
{text}
|
||||
</TagName>
|
||||
);
|
||||
};
|
||||
|
||||
export default SplitText;
|
||||
@@ -1,11 +0,0 @@
|
||||
export const SidePattern = () => (
|
||||
<aside className="side-pattern-container">
|
||||
<div className="side-pattern-image">
|
||||
<div className="h-full w-full bg-linear-to-b from-heading/20 via-transparent to-heading/20 flex flex-col items-center py-8">
|
||||
<span className="text-heading text-sm font-bold vertical-text uppercase tracking-widest opacity-50">
|
||||
Solidarité • Ukraine • Pont-à-Mousson
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
);
|
||||
+5
-15
@@ -12,29 +12,19 @@
|
||||
--color-bg-carousel: #d3c1a5;
|
||||
}
|
||||
|
||||
/* On définit nos composants sans @apply sur des classes custom */
|
||||
@layer components {
|
||||
.side-pattern-container {
|
||||
@apply w-20 md:w-32 bg-white relative overflow-hidden border-l border-gray-200 shadow-inner shrink-0;
|
||||
}
|
||||
|
||||
/* On met le background-image directement ici sans passer par une autre classe */
|
||||
.side-pattern-image {
|
||||
@apply absolute inset-0 opacity-90;
|
||||
background-image: url("/bandeau.jpg");
|
||||
background-repeat: repeat-y;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.vertical-text {
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
@apply bg-bg-1 text-site-text;
|
||||
margin: 0;
|
||||
font-family:
|
||||
"Montserrat", sans-serif; /* Pense à l'importer dans index.html */
|
||||
/* Passage à Poppins */
|
||||
font-family: "Poppins", sans-serif;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,59 @@
|
||||
import { Outlet } from "react-router-dom";
|
||||
import { Navbar } from "../components/Navbar";
|
||||
import { SidePattern } from "../components/SidePattern";
|
||||
import { Outlet, useLocation } from "react-router-dom";
|
||||
import PillNav from "../components/PillNav";
|
||||
import logo from "/logo.png";
|
||||
|
||||
export const MainLayout = () => {
|
||||
const location = useLocation();
|
||||
|
||||
// On simplifie la palette pour le PillNav
|
||||
const themeColors = {
|
||||
primary: "#1a247f", // Bleu profond
|
||||
accent: "#f7f0e5", // Beige
|
||||
white: "#ffffff", // Blanc
|
||||
red: "#751424",
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
<Navbar />
|
||||
<div className="flex flex-col min-h-screen bg-bg-1 font-sans text-site-text">
|
||||
<div className="fixed top-0 left-0 w-full z-50 flex justify-center pt-4 md:pt-6 pointer-events-none px-4 md:px-0">
|
||||
<div className="pointer-events-auto flex items-center justify-between w-full md:w-auto md:justify-center gap-4 max-w-400">
|
||||
<PillNav
|
||||
logo={logo}
|
||||
logoAlt="Coeur UA PAM Logo"
|
||||
items={[
|
||||
{ label: "Accueil", href: "/" },
|
||||
{ label: "À Propos", href: "/a-propos" },
|
||||
{ label: "Historique", href: "/historique" },
|
||||
{ label: "Événements", href: "/evenements" },
|
||||
]}
|
||||
activeHref={location.pathname}
|
||||
// LOGIQUE DES COULEURS RÉPARÉE :
|
||||
baseColor={themeColors.accent} // Fond de la barre : BEIGE
|
||||
pillColor={themeColors.accent} // Fond des boutons normaux : BEIGE
|
||||
pillTextColor={themeColors.primary} // Texte normal : Bleu sur BEIGE
|
||||
hoveredPillTextColor={themeColors.white} // Texte survolé : Blanc sur Bleu
|
||||
ease="power2.out"
|
||||
initialLoadAnimation={true}
|
||||
/>
|
||||
|
||||
{/* Bouton SOUTENIR */}
|
||||
<a
|
||||
href="https://www.leetchi.com/fr/c/coeur-ua-pam-6398197?utm_source=copylink&utm_medium=social_sharing://www.helloasso.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="hidden md:flex items-center justify-center h-10.5 px-6 rounded-full bg-heading text-white font-semibold uppercase tracking-wider text-sm hover:bg-heading-accent hover:scale-105 transition-all shadow-lg border-2 border-transparent"
|
||||
>
|
||||
Soutenir
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-1">
|
||||
<main className="flex-1 p-8 md:p-16 bg-bg-1 overflow-y-auto">
|
||||
<Outlet />
|
||||
<main className="flex-1 pb-10 px md">
|
||||
<div className="w-full mx-auto">
|
||||
<Outlet />
|
||||
</div>
|
||||
</main>
|
||||
<SidePattern />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
+165
-3
@@ -1,9 +1,171 @@
|
||||
import AnimatedContent from "../components/AnimatedContent";
|
||||
|
||||
const About = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-5xl font-bold text-heading mb-6">À propos</h1>
|
||||
<p>Contenu de l'association...</p>
|
||||
<div className="w-full pb-20">
|
||||
{/* SECTION 1 : HERO IMAGE (Inspiré du bloc avec la tortue) */}
|
||||
<AnimatedContent distance={60} direction="vertical" duration={1}>
|
||||
<div className="relative w-full h-[70vh] min-h-125 overflow-hidden mb-24 shadow-2xl">
|
||||
{/* Image Placeholder */}
|
||||
<img
|
||||
src="/hero-section/a-propos.jpg"
|
||||
alt="Association Coeur UA PAM"
|
||||
className="absolute inset-0 w-full h-full object-cover"
|
||||
/>
|
||||
{/* Overlay sombre pour lire le texte */}
|
||||
<div className="absolute inset-0 bg-black/50"></div>
|
||||
|
||||
{/* Contenu textuel positionné en bas */}
|
||||
<div className="absolute bottom-0 left-0 w-full p-8 md:p-16">
|
||||
<div className="max-w-4xl">
|
||||
<h1 className="text-5xl md:text-7xl font-bold text-white mb-6 leading-tight">
|
||||
Solidarité, Culture <br /> et Entraide.
|
||||
</h1>
|
||||
<p className="text-xl md:text-2xl text-white/90 font-light max-w-2xl leading-relaxed">
|
||||
Née d'une volonté forte de rassembler et d'agir, l'association{" "}
|
||||
<strong className="font-semibold text-hover-nav">
|
||||
Cœur UA PAM
|
||||
</strong>{" "}
|
||||
a pour vocation de faire vivre la culture ukrainienne et
|
||||
d'apporter un soutien vital à ceux qui en ont besoin.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
|
||||
{/* SECTION 2 : SPLIT BLOCK (Inspiré du bloc Beige/Blanc avec les pourcentages) */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-0 overflow-hidden mb-24 shadow-xl">
|
||||
{/* Moitié Gauche : Bloc de couleur unie (Beige) */}
|
||||
<div className="bg-bg-2 p-12 md:p-20 flex flex-col justify-center">
|
||||
<AnimatedContent
|
||||
distance={40}
|
||||
direction="horizontal"
|
||||
duration={0.8}
|
||||
threshold={0.2}
|
||||
>
|
||||
<h2 className="text-4xl md:text-5xl font-bold text-heading mb-8 leading-tight">
|
||||
Nos missions <br /> au quotidien
|
||||
</h2>
|
||||
<p className="text-lg text-site-text leading-relaxed font-medium">
|
||||
Notre force réside dans la diversité de nos actions. De
|
||||
l'accompagnement des réfugiés en France jusqu'au soutien
|
||||
logistique en Ukraine, chaque initiative compte.
|
||||
</p>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
|
||||
{/* Moitié Droite : Bloc Blanc avec les points clés très aérés */}
|
||||
<div className="bg-white p-12 md:p-20 flex flex-col justify-center gap-12">
|
||||
<AnimatedContent
|
||||
distance={30}
|
||||
direction="vertical"
|
||||
delay={0.2}
|
||||
threshold={0.2}
|
||||
>
|
||||
<div>
|
||||
<span className="text-6xl font-bold text-primary opacity-20 block mb-2">
|
||||
01.
|
||||
</span>
|
||||
<h3 className="text-2xl font-bold text-primary mb-3">
|
||||
Action Humanitaire
|
||||
</h3>
|
||||
<p className="text-site-text">
|
||||
Mener des actions d'entraide concrètes en faveur des Ukrainiens
|
||||
réfugiés en France, mais aussi de ceux restés en Ukraine.
|
||||
</p>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
|
||||
<AnimatedContent
|
||||
distance={30}
|
||||
direction="vertical"
|
||||
delay={0.4}
|
||||
threshold={0.2}
|
||||
>
|
||||
<div>
|
||||
<span className="text-6xl font-bold text-hover-nav opacity-40 block mb-2">
|
||||
02.
|
||||
</span>
|
||||
<h3 className="text-2xl font-bold text-hover-nav mb-3">
|
||||
Culture & Partage
|
||||
</h3>
|
||||
<p className="text-site-text">
|
||||
Promouvoir la culture ukrainienne à travers la création
|
||||
artistique, des événements et le développement de partenariats
|
||||
locaux.
|
||||
</p>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
|
||||
<AnimatedContent
|
||||
distance={30}
|
||||
direction="vertical"
|
||||
delay={0.6}
|
||||
threshold={0.2}
|
||||
>
|
||||
<div>
|
||||
<span className="text-6xl font-bold text-heading opacity-20 block mb-2">
|
||||
03.
|
||||
</span>
|
||||
<h3 className="text-2xl font-bold text-heading mb-3">
|
||||
Éducation
|
||||
</h3>
|
||||
<p className="text-site-text">
|
||||
Favoriser l'intégration linguistique, le bilinguisme et
|
||||
organiser des activités ludiques dédiées aux enfants.
|
||||
</p>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* SECTION 3 : FOCUS SUR LA CAGNOTTE / ACTION DIRECTE (Image à gauche, texte à droite) */}
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
duration={1}
|
||||
threshold={0.2}
|
||||
>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
|
||||
<div className="h-100 overflow-hidden shadow-lg">
|
||||
<img
|
||||
src="/a-propos/solidarite.jpg"
|
||||
alt="Préparation de colis"
|
||||
className="w-full h-full object-cover object-top"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Texte Action */}
|
||||
<div className="px-4 lg:px-12">
|
||||
<h2 className="text-4xl font-bold text-heading mb-6">
|
||||
Une chaîne de solidarité active
|
||||
</h2>
|
||||
<p className="text-xl text-site-text mb-6 leading-relaxed">
|
||||
L'intégralité des fonds récoltés sert à soutenir directement ceux
|
||||
qui sont sur le terrain.
|
||||
</p>
|
||||
<div className="bg-primary/5 border-l-4 border-primary p-6 rounded-r-2xl mb-8">
|
||||
<p className="font-semibold text-primary">
|
||||
Nous préparons, finançons et acheminons des colis de première
|
||||
nécessité destinés aux combattants ukrainiens (nourriture,
|
||||
hygiène, vêtements chauds).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<a
|
||||
href="https://www.leetchi.com/fr/c/coeur-ua-pam-6398197?utm_source=copylink&utm_medium=social_sharing"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center justify-center px-8 py-4 rounded-full bg-heading text-white font-bold uppercase tracking-wider hover:bg-heading-accent hover:scale-105 transition-all shadow-xl"
|
||||
>
|
||||
Participer à la cagnotte
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default About;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
const Events = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-5xl font-bold text-heading mb-6">Evenements</h1>
|
||||
<p>Contenu de l'association...</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default Events;
|
||||
@@ -0,0 +1,9 @@
|
||||
const Historic = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-5xl font-bold text-heading mb-6">Historique</h1>
|
||||
<p>Contenu de l'association...</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default Historic;
|
||||
@@ -0,0 +1,175 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import AnimatedContent from "../components/AnimatedContent";
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
<div className="w-full pb-20">
|
||||
{/* --- HERO SECTION --- */}
|
||||
<AnimatedContent distance={50} direction="vertical" duration={1}>
|
||||
<div className="relative w-full h-[80vh] min-h-150 overflow-hidden mb-12 shadow-2xl group">
|
||||
{/* Image de fond avec effet de zoom lent au survol */}
|
||||
<img
|
||||
src="/hero-section/accueil.jpg"
|
||||
alt="Accueil Association"
|
||||
className="absolute inset-0 w-full h-full object-cover transition-transform duration-[10s] ease-linear group-hover:scale-105"
|
||||
/>
|
||||
|
||||
{/* Gradient Overlay pour lisibilité */}
|
||||
<div className="absolute inset-0 bg-linear-to-t from-primary/90 via-primary/40 to-transparent"></div>
|
||||
|
||||
{/* Contenu Hero */}
|
||||
<div className="absolute bottom-0 left-0 w-full p-8 md:p-16 flex flex-col items-start">
|
||||
<h1 className="text-5xl md:text-7xl lg:text-8xl font-bold text-white mb-6 leading-none tracking-tight">
|
||||
Unir. Aider. <br />
|
||||
<span className="text-hover-nav">Partager.</span>
|
||||
</h1>
|
||||
<p className="text-xl text-gray-200 max-w-2xl mb-8 font-light">
|
||||
L'association franco-ukrainienne au cœur de l'action. Rejoignez
|
||||
notre mouvement pour la culture et la solidarité.
|
||||
</p>
|
||||
|
||||
<div className="flex flex-wrap gap-4">
|
||||
<Link
|
||||
to="/evenements"
|
||||
className="px-8 py-4 rounded-full bg-white text-primary font-bold uppercase tracking-wider hover:bg-hover-nav hover:text-primary transition-all shadow-lg"
|
||||
>
|
||||
Nos Événements
|
||||
</Link>
|
||||
<a
|
||||
href="https://www.helloasso.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="px-8 py-4 rounded-full bg-heading text-white font-bold uppercase tracking-wider hover:bg-heading-accent transition-all shadow-lg"
|
||||
>
|
||||
Faire un don
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
|
||||
{/* --- BENTO GRID NAVIGATION --- */}
|
||||
{/* Une grille moderne pour présenter les sections clés */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-20">
|
||||
{/* CARTE 1 : Historique (Prend 1 colonne) */}
|
||||
<div className="md:col-span-1">
|
||||
<AnimatedContent
|
||||
distance={30}
|
||||
direction="vertical"
|
||||
delay={0.2}
|
||||
className="h-full"
|
||||
>
|
||||
<Link to="/historique" className="block h-full group">
|
||||
<div className="relative h-full min-h-100 bg-bg-2 p-10 flex flex-col justify-between overflow-hidden transition-all hover:shadow-xl hover:-translate-y-1">
|
||||
<div className="z-10">
|
||||
<span className="inline-block px-4 py-1 rounded-full border border-heading text-heading text-xs font-bold uppercase tracking-widest mb-4">
|
||||
Notre histoire
|
||||
</span>
|
||||
<h3 className="text-3xl font-bold text-primary mb-2">
|
||||
D'où venons-nous ?
|
||||
</h3>
|
||||
<p className="text-site-text opacity-80">
|
||||
Découvrez l'origine de notre engagement et nos fondateurs.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Élément décoratif visuel */}
|
||||
<div className="absolute -bottom-10 -right-10 w-48 h-48 bg-hover-nav rounded-full opacity-20 blur-2xl group-hover:scale-150 transition-transform duration-700"></div>
|
||||
<div className="absolute bottom-8 right-8 w-12 h-12 rounded-full bg-white flex items-center justify-center text-primary group-hover:bg-primary group-hover:text-white transition-colors">
|
||||
➝
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
|
||||
{/* CARTE 2 : Événement Phare (Prend 2 colonnes) */}
|
||||
<div className="md:col-span-2">
|
||||
<AnimatedContent
|
||||
distance={30}
|
||||
direction="vertical"
|
||||
delay={0.4}
|
||||
className="h-full"
|
||||
>
|
||||
<Link to="/evenements" className="block h-full group">
|
||||
<div className="relative h-full min-h-100 overflow-hidden shadow-lg">
|
||||
<img
|
||||
src="/home/nos-grands-rdv.jpg"
|
||||
alt="Événement à la une"
|
||||
className="absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black/30 group-hover:bg-black/40 transition-colors"></div>
|
||||
|
||||
<div className="absolute bottom-0 left-0 p-10 w-full">
|
||||
<span className="inline-block px-4 py-1 rounded-full bg-white text-heading-accent text-xs font-bold uppercase tracking-widest mb-4">
|
||||
À ne pas manquer
|
||||
</span>
|
||||
<h3 className="text-4xl font-bold text-white mb-2">
|
||||
Nos grands rendez-vous
|
||||
</h3>
|
||||
<p className="text-white/90 text-lg max-w-lg">
|
||||
Octobre Rose, Noël Ukrainien... Participez à nos moments
|
||||
forts de partage et de culture.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* --- SECTION CHIFFRES / IMPACT (Style minimaliste) --- */}
|
||||
<AnimatedContent
|
||||
distance={40}
|
||||
direction="vertical"
|
||||
delay={0.2}
|
||||
threshold={0.5}
|
||||
>
|
||||
<div className="bg-primary p-12 md:p-24 text-center text-white relative overflow-hidden">
|
||||
{/* Pattern décoratif en fond (optionnel) */}
|
||||
<div
|
||||
className="absolute top-0 left-0 w-full h-full opacity-10 pointer-events-none"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"radial-gradient(circle, #dfbe85 1px, transparent 1px)",
|
||||
backgroundSize: "30px 30px",
|
||||
}}
|
||||
></div>
|
||||
|
||||
<h2 className="text-3xl md:text-5xl font-bold mb-16 relative z-10">
|
||||
Ensemble, nous faisons la différence
|
||||
</h2>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 relative z-10">
|
||||
<div>
|
||||
<span className="block text-6xl md:text-7xl font-bold text-hover-nav mb-2">
|
||||
50+
|
||||
</span>
|
||||
<span className="text-lg uppercase tracking-widest opacity-80">
|
||||
Bénévoles Actifs
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="block text-6xl md:text-7xl font-bold text-hover-nav mb-2">
|
||||
100s
|
||||
</span>
|
||||
<span className="text-lg uppercase tracking-widest opacity-80">
|
||||
Colis Envoyés
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="block text-6xl md:text-7xl font-bold text-hover-nav mb-2">
|
||||
∞
|
||||
</span>
|
||||
<span className="text-lg uppercase tracking-widest opacity-80">
|
||||
Moments Partagés
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
Reference in New Issue
Block a user