feat: redesign events gallery and polish site UX (#1)
Deploy React Site / build-and-deploy (push) Successful in 11s

- Events: render each year as a horizontal band of media at native ratio with a chapter card, lightbox (keyboard nav + close), and a progress bar.

- Add a route transition overlay that preloads the destination hero image and shows a typed "Unis par le cœur" loading bar; hide the header while active and sync page entrance animations until the transition ends.

- Add proper favicon set (favicon.ico, Apple touch icon, Android/PWA icon) and web manifest; fix the icon MIME type.

- Mobile menu: replace hover-only feedback with an :active tap state (color + scale), remove sticky hover.

- Privacy policy: document server-side relay of Meta content, add hosting/logs and GDPR rights sections.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #1
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
This commit was merged in pull request #1.
This commit is contained in:
Gitea Actions
2026-10-19 21:59:09 +00:00
committed by Esiah
co-authored by Esiah
parent 1c445fdcd2
commit 92b868d966
15 changed files with 552 additions and 157 deletions
+52
View File
@@ -0,0 +1,52 @@
name: PR — Ouverture automatique
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
create-pr:
runs-on: coeur-ua-pam
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ouvrir (ou vérifier) la pull request
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API: ${{ github.server_url }}/api/v1
REPO: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
run: |
set -eu
if [ "$BRANCH" = "main" ]; then
echo "main est la base : aucune PR à ouvrir."
exit 0
fi
title=$(git log -1 --pretty=%s)
body=$(git log -1 --pretty=%b)
[ -n "$body" ] || body="PR automatique de $BRANCH vers main."
open=$(curl -fsS -H "Authorization: token $GITEA_TOKEN" \
"$API/repos/$REPO/pulls?state=open&limit=50" \
| python3 -c 'import json,os,sys; b=os.environ["BRANCH"]; print(sum(1 for p in json.load(sys.stdin) if p.get("head", {}).get("ref") == b))')
if [ "$open" -gt 0 ]; then
echo "Une PR est déjà ouverte pour $BRANCH."
exit 0
fi
python3 - "$BRANCH" "$title" "$body" <<'PY' | curl -fsS -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @- \
"$API/repos/$REPO/pulls"
import json, sys
branch, title, body = sys.argv[1], sys.argv[2], sys.argv[3]
print(json.dumps({"base": "main", "head": branch, "title": title, "body": body}))
PY
echo "PR créée."
+4 -1
View File
@@ -2,7 +2,10 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.png" /> <link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Coeur UA PAM - Unis par le coeur</title> <title>Coeur UA PAM - Unis par le coeur</title>
<link <link
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+19
View File
@@ -0,0 +1,19 @@
{
"name": "Cœur UA PAM",
"short_name": "Cœur UA PAM",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/logo.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#1a247f",
"background_color": "#f7f0e5",
"display": "standalone"
}
+2
View File
@@ -6,11 +6,13 @@ import Events from "./pages/Events";
import Historic from "./pages/Historic"; import Historic from "./pages/Historic";
import Privacy from "./pages/Privacy"; import Privacy from "./pages/Privacy";
import ScrollToTop from "./components/ScrollToTop"; import ScrollToTop from "./components/ScrollToTop";
import PageTransition from "./components/PageTransition";
function App() { function App() {
return ( return (
<BrowserRouter> <BrowserRouter>
<ScrollToTop /> <ScrollToTop />
<PageTransition />
<Routes> <Routes>
<Route path="/" element={<MainLayout />}> <Route path="/" element={<MainLayout />}>
<Route path="/" element={<Home />} /> <Route path="/" element={<Home />} />
+7 -1
View File
@@ -1,6 +1,7 @@
import React, { useRef, useEffect } from "react"; import React, { useRef, useEffect } from "react";
import { gsap } from "gsap"; import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger"; import { ScrollTrigger } from "gsap/ScrollTrigger";
import { runAfterTransition } from "../lib/transition";
gsap.registerPlugin(ScrollTrigger); gsap.registerPlugin(ScrollTrigger);
@@ -96,15 +97,20 @@ const AnimatedContent: React.FC<AnimatedContentProps> = ({
ease, ease,
}); });
let stopWaiting = () => {};
const st = ScrollTrigger.create({ const st = ScrollTrigger.create({
trigger: el, trigger: el,
scroller: scrollerTarget || window, scroller: scrollerTarget || window,
start: `top ${startPct}%`, start: `top ${startPct}%`,
once: true, once: true,
onEnter: () => tl.play(), onEnter: () => {
stopWaiting = runAfterTransition(() => tl.play());
},
}); });
return () => { return () => {
stopWaiting();
st.kill(); st.kill();
tl.kill(); tl.kill();
}; };
+131
View File
@@ -0,0 +1,131 @@
import { useLayoutEffect, useRef } from "react";
import { useLocation } from "react-router-dom";
import logo from "/logo.png";
import { markTransitionStart, markTransitionEnd } from "../lib/transition";
const HERO_IMAGES: Record<string, string> = {
"/": "/hero-section/accueil.webp",
"/a-propos": "/hero-section/a-propos.webp",
"/notre-histoire": "/hero-section/historique.webp",
"/evenements": "/hero-section/evenements.webp",
};
const FADE_IN_MS = 220;
const BAR_MS = 750;
const MIN_VISIBLE_MS = 750;
const MAX_WAIT_MS = 2500;
const PageTransition = () => {
const { pathname } = useLocation();
const overlayRef = useRef<HTMLDivElement>(null);
const fillRef = useRef<HTMLDivElement>(null);
const textRef = useRef<HTMLSpanElement>(null);
useLayoutEffect(() => {
const overlay = overlayRef.current;
const fill = fillRef.current;
const text = textRef.current;
if (!overlay || !fill || !text) return;
markTransitionStart();
document.documentElement.classList.add("is-transitioning");
overlay.style.transition = "none";
overlay.style.opacity = "0";
overlay.style.visibility = "visible";
overlay.style.pointerEvents = "auto";
fill.style.transition = "none";
fill.style.width = "0%";
text.style.transition = "none";
text.style.clipPath = "inset(0 100% 0 0)";
void overlay.offsetWidth;
overlay.style.transition = `opacity ${FADE_IN_MS}ms ease-in-out`;
overlay.style.opacity = "1";
fill.style.transition = `width ${BAR_MS}ms ease-out`;
fill.style.width = "100%";
text.style.transition = `clip-path ${BAR_MS}ms ease-out`;
text.style.clipPath = "inset(0 0% 0 0)";
const startedAt = performance.now();
let done = false;
const reveal = () => {
if (done) return;
done = true;
markTransitionEnd();
document.documentElement.classList.remove("is-transitioning");
overlay.style.transition = "none";
overlay.style.opacity = "0";
overlay.style.visibility = "hidden";
overlay.style.pointerEvents = "none";
};
const finishAfterMinimum = () => {
const remaining = MIN_VISIBLE_MS - (performance.now() - startedAt);
window.setTimeout(reveal, Math.max(0, remaining));
};
const maxTimer = window.setTimeout(reveal, MAX_WAIT_MS);
const src = HERO_IMAGES[pathname];
if (src) {
let handled = false;
const onReady = () => {
if (handled) return;
handled = true;
window.clearTimeout(maxTimer);
finishAfterMinimum();
};
const image = new Image();
image.onload = onReady;
image.onerror = onReady;
image.src = src;
if (image.complete) onReady();
} else {
window.clearTimeout(maxTimer);
finishAfterMinimum();
}
return () => {
window.clearTimeout(maxTimer);
document.documentElement.classList.remove("is-transitioning");
};
}, [pathname]);
return (
<div
ref={overlayRef}
aria-hidden="true"
style={{ opacity: 0, visibility: "hidden", pointerEvents: "none" }}
className="fixed inset-0 z-[2000] bg-bg-1"
>
<div className="flex h-full items-center justify-center">
<img
src={logo}
alt=""
className="h-40 w-40 animate-pulse md:h-56 md:w-56"
/>
</div>
<div className="absolute inset-x-0 bottom-0 h-16 overflow-hidden bg-primary/10">
<span className="absolute inset-0 flex items-center justify-center whitespace-nowrap text-sm font-semibold uppercase tracking-[0.3em] text-primary/25">
Unis par le cœur
</span>
<div
ref={fillRef}
style={{ width: "0%" }}
className="absolute inset-y-0 left-0 bg-primary"
/>
<span
ref={textRef}
style={{ clipPath: "inset(0 100% 0 0)" }}
className="absolute inset-0 flex items-center justify-center whitespace-nowrap text-sm font-semibold uppercase tracking-[0.3em] text-white"
>
Unis par le cœur
</span>
</div>
</div>
);
};
export default PageTransition;
+3 -23
View File
@@ -462,7 +462,7 @@ const PillNav: React.FC<PillNavProps> = ({
onClick={toggleMobileMenu} onClick={toggleMobileMenu}
aria-label="Toggle menu" aria-label="Toggle menu"
aria-expanded={isMobileMenuOpen} aria-expanded={isMobileMenuOpen}
className="md:hidden rounded-full border-0 flex flex-col items-center justify-center gap-1 cursor-pointer p-0 relative" className="md:hidden rounded-full border-0 flex flex-col items-center justify-center gap-1 cursor-pointer p-0 relative transition-transform duration-150 active:scale-90"
style={{ style={{
width: "var(--nav-h)", width: "var(--nav-h)",
height: "var(--nav-h)", height: "var(--nav-h)",
@@ -488,22 +488,8 @@ const PillNav: React.FC<PillNavProps> = ({
> >
<ul className="list-none m-0 flex flex-col gap-2"> <ul className="list-none m-0 flex flex-col gap-2">
{items.map((item) => { {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 = 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"; "mobile-menu-link block py-4 px-6 text-[16px] font-semibold rounded-b-[20px] transition-all duration-200 uppercase tracking-wide text-center shadow-md";
return ( return (
<li key={item.href}> <li key={item.href}>
@@ -511,10 +497,7 @@ const PillNav: React.FC<PillNavProps> = ({
<Link <Link
to={item.href} to={item.href}
className={linkClasses} className={linkClasses}
style={defaultStyle} onClick={closeMobileMenu}
onMouseEnter={hoverIn}
onMouseLeave={hoverOut}
onClick={closeMobileMenu} // On appelle bien notre fonction qui modifie l'état et lance l'animation de fermeture
> >
{item.label} {item.label}
</Link> </Link>
@@ -522,9 +505,6 @@ const PillNav: React.FC<PillNavProps> = ({
<a <a
href={item.href} href={item.href}
className={linkClasses} className={linkClasses}
style={defaultStyle}
onMouseEnter={hoverIn}
onMouseLeave={hoverOut}
onClick={closeMobileMenu} onClick={closeMobileMenu}
> >
{item.label} {item.label}
+21
View File
@@ -18,6 +18,27 @@
text-orientation: mixed; text-orientation: mixed;
transform: rotate(180deg); transform: rotate(180deg);
} }
.site-header {
transition: opacity 150ms ease-out;
}
.mobile-menu-link {
background-color: var(--pill-bg);
color: var(--pill-text);
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.mobile-menu-link:active {
background-color: var(--color-bg-2);
color: var(--color-heading-accent);
transform: scale(0.96);
}
}
.is-transitioning .site-header {
opacity: 0;
} }
body { body {
+1 -1
View File
@@ -18,7 +18,7 @@ export const MainLayout = () => {
return ( return (
<div className="flex flex-col min-h-screen bg-bg-1 font-sans text-site-text"> <div className="flex flex-col min-h-screen bg-bg-1 font-sans text-site-text">
{/* NAVIGATION */} {/* NAVIGATION */}
<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="site-header 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"> <div className="pointer-events-auto flex items-center justify-between w-full md:w-auto md:justify-center gap-4 max-w-400">
<PillNav <PillNav
logo={logo} logo={logo}
+28
View File
@@ -0,0 +1,28 @@
const TRANSITION_END_EVENT = "cup:transition-end";
let transitionActive = false;
export const markTransitionStart = () => {
transitionActive = true;
};
export const markTransitionEnd = () => {
if (!transitionActive) return;
transitionActive = false;
window.dispatchEvent(new Event(TRANSITION_END_EVENT));
};
export const runAfterTransition = (callback: () => void): (() => void) => {
if (!transitionActive) {
callback();
return () => {};
}
const handler = () => {
window.removeEventListener(TRANSITION_END_EVENT, handler);
callback();
};
window.addEventListener(TRANSITION_END_EVENT, handler);
return () => window.removeEventListener(TRANSITION_END_EVENT, handler);
};
+233 -117
View File
@@ -1,4 +1,4 @@
import { useLayoutEffect, useRef, useState, useCallback } from "react"; import { useLayoutEffect, useRef, useState, useCallback, useEffect } from "react";
import AnimatedContent from "../components/AnimatedContent"; import AnimatedContent from "../components/AnimatedContent";
import SEO from "../components/SEO"; import SEO from "../components/SEO";
@@ -29,14 +29,137 @@ interface Category {
history: HistoryItem[]; history: HistoryItem[];
} }
interface YearGroupImage {
item: EventImage;
index: number;
}
interface YearGroup { interface YearGroup {
year: string; year: string;
title: string; title: string;
bg: string; bg: string;
text: string; text: string;
images: EventImage[]; images: YearGroupImage[];
} }
const isVideo = (src?: string) => !!src && /\.(mp4|webm)$/i.test(src);
// ============================================================================
// SOUS-COMPOSANT : Lightbox plein écran (images + vidéos)
// ============================================================================
const Lightbox = ({
items,
index,
onClose,
onNavigate,
}: {
items: EventImage[];
index: number;
onClose: () => void;
onNavigate: (index: number) => void;
}) => {
const item = items[index];
useEffect(() => {
const onKey = (event: KeyboardEvent) => {
if (event.key === "Escape") onClose();
else if (event.key === "ArrowRight")
onNavigate((index + 1) % items.length);
else if (event.key === "ArrowLeft")
onNavigate((index - 1 + items.length) % items.length);
};
window.addEventListener("keydown", onKey);
const previousOverflow = document.body.style.overflow;
document.body.style.overflow = "hidden";
return () => {
window.removeEventListener("keydown", onKey);
document.body.style.overflow = previousOverflow;
};
}, [index, items.length, onClose, onNavigate]);
if (!item) return null;
const previous = () => onNavigate((index - 1 + items.length) % items.length);
const next = () => onNavigate((index + 1) % items.length);
return (
<div
className="fixed inset-0 z-[1500] flex items-center justify-center bg-black/90 p-4 backdrop-blur-sm md:p-10"
onClick={onClose}
role="dialog"
aria-modal="true"
>
<button
type="button"
aria-label="Fermer"
onClick={onClose}
className="absolute right-4 top-4 z-10 flex h-11 w-11 items-center justify-center rounded-full bg-white/10 text-2xl text-white transition-colors hover:bg-white/25 md:right-8 md:top-6"
>
×
</button>
{items.length > 1 && (
<>
<button
type="button"
aria-label="Média précédent"
onClick={(event) => {
event.stopPropagation();
previous();
}}
className="absolute left-3 z-10 flex h-11 w-11 items-center justify-center rounded-full bg-white/10 text-2xl text-white transition-colors hover:bg-white/25 md:left-8"
>
‹
</button>
<button
type="button"
aria-label="Média suivant"
onClick={(event) => {
event.stopPropagation();
next();
}}
className="absolute right-3 z-10 flex h-11 w-11 items-center justify-center rounded-full bg-white/10 text-2xl text-white transition-colors hover:bg-white/25 md:right-8"
>
›
</button>
</>
)}
<figure
className="flex max-h-[88vh] max-w-[92vw] flex-col items-center gap-4"
onClick={(event) => event.stopPropagation()}
>
{isVideo(item.src) ? (
<video
src={item.src}
controls
autoPlay
loop
playsInline
className="max-h-[80vh] max-w-[92vw] rounded-xl shadow-2xl"
/>
) : (
<img
src={item.src}
alt={item.alt}
className="max-h-[80vh] max-w-[92vw] rounded-xl object-contain shadow-2xl"
/>
)}
{(item.imageTitle || item.imageDesc) && (
<figcaption className="max-w-2xl text-center text-white/85">
{item.imageTitle && (
<div className="text-lg font-semibold">{item.imageTitle}</div>
)}
{item.imageDesc && (
<div className="text-sm text-white/70">{item.imageDesc}</div>
)}
</figcaption>
)}
</figure>
</div>
);
};
// ============================================================================ // ============================================================================
// SOUS-COMPOSANT : Gère l'effet "Scroll Vertical -> Glissement Horizontal" // SOUS-COMPOSANT : Gère l'effet "Scroll Vertical -> Glissement Horizontal"
// ============================================================================ // ============================================================================
@@ -45,10 +168,16 @@ const CategoryHorizontalScroll = ({ category }: { category: Category }) => {
const trackRef = useRef<HTMLDivElement>(null); const trackRef = useRef<HTMLDivElement>(null);
const [progress, setProgress] = useState(0); const [progress, setProgress] = useState(0);
const [maxTranslate, setMaxTranslate] = useState(0); const [maxTranslate, setMaxTranslate] = useState(0);
const [trackHeight, setTrackHeight] = useState("100vh");
const [lightboxIndex, setLightboxIndex] = useState<number | null>(null);
const media = category.history.filter(
(item): item is EventImage => item.type === "image",
);
// 1. On regroupe les images par année
const groupedHistory: YearGroup[] = []; const groupedHistory: YearGroup[] = [];
let currentYear: YearGroup | null = null; let currentYear: YearGroup | null = null;
let mediaIndex = 0;
category.history.forEach((item: HistoryItem) => { category.history.forEach((item: HistoryItem) => {
if (item.type === "intro") { if (item.type === "intro") {
@@ -62,171 +191,158 @@ const CategoryHorizontalScroll = ({ category }: { category: Category }) => {
groupedHistory.push(newYearGroup); groupedHistory.push(newYearGroup);
currentYear = newYearGroup; currentYear = newYearGroup;
} else if (item.type === "image" && currentYear) { } else if (item.type === "image" && currentYear) {
currentYear.images.push(item); currentYear.images.push({ item, index: mediaIndex });
mediaIndex += 1;
} }
}); });
// 2. Logique de calcul du scroll
const handleScroll = useCallback(() => { const handleScroll = useCallback(() => {
if (!containerRef.current) return; if (!containerRef.current) return;
const rect = containerRef.current.getBoundingClientRect(); const rect = containerRef.current.getBoundingClientRect();
const windowHeight = window.innerHeight; const maxScroll = rect.height - window.innerHeight;
if (maxScroll <= 0) {
const maxScroll = rect.height - windowHeight; setProgress(0);
const currentScroll = -rect.top; return;
}
let p = currentScroll / maxScroll; const p = Math.max(0, Math.min(1, -rect.top / maxScroll));
p = Math.max(0, Math.min(1, p));
setProgress(p); setProgress(p);
}, []); }, []);
useLayoutEffect(() => { useLayoutEffect(() => {
const updateMeasurements = () => { const track = trackRef.current;
if (trackRef.current) { if (!track) return;
const max = trackRef.current.scrollWidth - window.innerWidth + 80;
setMaxTranslate(max > 0 ? max : 0); const measure = () => {
} const max = Math.max(0, track.scrollWidth - window.innerWidth + 80);
setMaxTranslate(max);
setTrackHeight(`${window.innerHeight + max}px`);
}; };
updateMeasurements(); measure();
window.addEventListener("resize", updateMeasurements); const observer = new ResizeObserver(measure);
observer.observe(track);
window.addEventListener("resize", measure);
window.addEventListener("scroll", handleScroll, { passive: true }); window.addEventListener("scroll", handleScroll, { passive: true });
handleScroll(); const raf = requestAnimationFrame(handleScroll);
return () => { return () => {
window.removeEventListener("resize", updateMeasurements); cancelAnimationFrame(raf);
observer.disconnect();
window.removeEventListener("resize", measure);
window.removeEventListener("scroll", handleScroll); window.removeEventListener("scroll", handleScroll);
}; };
}, [handleScroll]); }, [handleScroll]);
const containerHeight = `${(groupedHistory.length + 1) * 80}vh`;
return ( return (
<section <section
ref={containerRef} ref={containerRef}
style={{ height: containerHeight }} style={{ height: trackHeight }}
className="relative w-full" className="relative w-full"
> >
<div className="sticky top-0 h-screen w-full flex items-center overflow-hidden bg-bg-1"> <div className="sticky top-0 flex h-screen w-full items-center overflow-hidden bg-bg-1">
<div <div
ref={trackRef} ref={trackRef}
className="flex items-center gap-12 md:gap-24 w-max px-6 md:px-20 will-change-transform" className="flex w-max items-center gap-10 px-6 will-change-transform md:gap-16 md:px-20"
style={{ style={{
transform: `translate3d(-${progress * maxTranslate}px, 0, 0)`, transform: `translate3d(-${progress * maxTranslate}px, 0, 0)`,
}} }}
> >
<div className="w-[85vw] md:w-[40vw] shrink-0 pl-2"> <div className="w-[78vw] shrink-0 md:w-[32vw]">
<h2 <h2
className={`text-5xl md:text-7xl lg:text-8xl font-black tracking-tight mb-6 ${category.themeColor}`} className={`mb-6 text-4xl font-black tracking-tight md:text-6xl lg:text-7xl ${category.themeColor}`}
> >
{category.title} {category.title}
</h2> </h2>
<div className="w-20 h-2 bg-heading-accent rounded-full mb-8"></div> <div className="mb-8 h-2 w-20 rounded-full bg-heading-accent" />
<p className="text-xl md:text-2xl text-site-text/80 leading-relaxed font-light"> <p className="text-xl font-light leading-relaxed text-site-text/80 md:text-2xl">
{category.description} {category.description}
</p> </p>
<p className="mt-6 text-xs uppercase tracking-[0.25em] text-site-text/40">
{groupedHistory.length} année
{groupedHistory.length > 1 ? "s" : ""} · {media.length} média
{media.length > 1 ? "s" : ""}
</p>
</div> </div>
{groupedHistory.map((yearGroup, index) => ( {groupedHistory.map((yearGroup) => (
<div <div
key={index} key={yearGroup.year}
className={`w-[85vw] md:w-[65vw] lg:w-[50vw] h-[65vh] md:h-[75vh] shrink-0 rounded-[40px] shadow-2xl flex flex-col p-6 md:p-10 border border-black/5 ${yearGroup.bg} ${yearGroup.text}`} className="flex shrink-0 items-center gap-6 md:gap-10"
> >
<div className="mb-6 flex flex-col gap-1"> <div
<h3 className="text-6xl md:text-7xl font-black opacity-90 tracking-tighter"> className={`flex h-[46vh] w-24 shrink-0 flex-col items-center justify-center gap-3 rounded-[28px] border border-black/5 px-2 text-center shadow-lg md:h-[54vh] md:w-32 ${yearGroup.bg} ${yearGroup.text}`}
>
<span className="text-2xl font-black tracking-tighter md:text-3xl">
{yearGroup.year} {yearGroup.year}
</h3> </span>
<p className="text-2xl md:text-3xl font-medium"> {yearGroup.title && (
{yearGroup.title} <span className="text-[10px] font-medium leading-snug md:text-xs">
</p> {yearGroup.title}
</span>
)}
<span className="text-[10px] uppercase tracking-widest opacity-60">
{yearGroup.images.length} média
{yearGroup.images.length > 1 ? "s" : ""}
</span>
</div> </div>
<div className="grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-4 flex-1"> <div className="flex shrink-0 items-center gap-4 md:gap-6">
{yearGroup.images.map((img, idx) => { {yearGroup.images.map(({ item, index }) => (
const total = yearGroup.images.length; <button
let spanClass = "col-span-1 row-span-1"; key={index}
type="button"
if (total === 1) { aria-label={item.alt || "Agrandir le média"}
spanClass = "col-span-2 md:col-span-3 row-span-2"; onClick={() => setLightboxIndex(index)}
} else if (total === 2) { className="group relative shrink-0 cursor-zoom-in overflow-hidden rounded-2xl shadow-xl"
spanClass = >
idx === 0 {isVideo(item.src) ? (
? "col-span-2 md:col-span-2" <>
: "col-span-2 md:col-span-1";
} else if (total >= 3) {
if (idx === 0) {
spanClass = "col-span-2 row-span-2";
} else {
let mobileSpan = "col-span-1";
let desktopSpan = "md:col-span-1";
if (idx === total - 1) {
if (total % 2 === 0) mobileSpan = "col-span-2";
if ((total - 3) % 3 === 1)
desktopSpan = "md:col-span-3";
if ((total - 3) % 3 === 2)
desktopSpan = "md:col-span-2";
}
spanClass = `${mobileSpan} ${desktopSpan} row-span-1`;
}
}
const isVideo =
img.src?.toLowerCase().endsWith(".mp4") ||
img.src?.toLowerCase().endsWith(".webm");
return (
<div
key={idx}
className={`relative rounded-2xl overflow-hidden bg-black/10 ${spanClass} group`}
>
{isVideo ? (
<video <video
src={img.src} src={item.src}
autoPlay
loop
muted muted
loop
playsInline playsInline
preload="metadata" preload="metadata"
className="absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" className="block h-[46vh] w-auto max-w-[75vw] object-cover transition-transform duration-700 group-hover:scale-105 md:h-[54vh]"
/> />
) : img.src ? ( <span className="pointer-events-none absolute inset-0 flex items-center justify-center">
<img <span className="flex h-12 w-12 items-center justify-center rounded-full bg-black/50 text-white">
src={img.src} ▶
alt={img.alt} </span>
loading="lazy" </span>
decoding="async" </>
className="absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" ) : (
/> <img
) : ( src={item.src}
<div className="absolute inset-0 flex items-center justify-center text-sm opacity-50 bg-white/10"> alt={item.alt}
Pas de média loading="lazy"
</div> decoding="async"
)} className="block h-[46vh] w-auto max-w-[75vw] object-cover transition-transform duration-700 group-hover:scale-105 md:h-[54vh]"
/>
{(img.imageTitle || img.imageDesc) && ( )}
<div className="absolute bottom-0 left-0 w-full p-4 md:p-6 bg-linear-to-t from-black/90 via-black/40 to-transparent"> </button>
{img.imageTitle && ( ))}
<h4 className="text-white font-bold text-base md:text-lg mb-1 drop-shadow-md">
{img.imageTitle}
</h4>
)}
{img.imageDesc && (
<p className="text-white/90 text-sm md:text-base leading-snug hidden md:block drop-shadow-sm">
{img.imageDesc}
</p>
)}
</div>
)}
</div>
);
})}
</div> </div>
</div> </div>
))} ))}
</div> </div>
<div className="absolute bottom-0 left-0 h-1 w-full bg-black/5">
<div
className="h-full bg-heading-accent"
style={{ width: `${progress * 100}%` }}
/>
</div>
</div> </div>
{lightboxIndex !== null && (
<Lightbox
items={media}
index={lightboxIndex}
onClose={() => setLightboxIndex(null)}
onNavigate={setLightboxIndex}
/>
)}
</section> </section>
); );
}; };
@@ -379,7 +495,7 @@ export default function Events() {
type: "intro", type: "intro",
year: "2022", year: "2022",
title: "Notre premier rassemblement", title: "Notre premier rassemblement",
bg: "bg-[#f7f0e5]", bg: "bg-white",
text: "text-[#1a247f]", text: "text-[#1a247f]",
}, },
{ {
@@ -455,7 +571,7 @@ export default function Events() {
type: "intro", type: "intro",
year: "2024", year: "2024",
title: "Un Noël de Solidarité", title: "Un Noël de Solidarité",
bg: "bg-[#f7f0e5]", bg: "bg-white",
text: "text-[#1a247f]", text: "text-[#1a247f]",
}, },
{ {
+45 -14
View File
@@ -1,11 +1,7 @@
import AnimatedContent from "../components/AnimatedContent"; import AnimatedContent from "../components/AnimatedContent";
const Privacy = () => { const Privacy = () => {
const lastUpdate = new Date().toLocaleDateString("fr-FR", { const lastUpdate = "19 octobre 2026";
year: "numeric",
month: "long",
day: "numeric",
});
return ( return (
<div className="w-full pt-32 pb-20 bg-bg-1 min-h-screen"> <div className="w-full pt-32 pb-20 bg-bg-1 min-h-screen">
@@ -50,6 +46,7 @@ const Privacy = () => {
<li>Aucun formulaire d'inscription.</li> <li>Aucun formulaire d'inscription.</li>
<li>Aucun système de commentaire.</li> <li>Aucun système de commentaire.</li>
<li>Aucune inscription à une newsletter.</li> <li>Aucune inscription à une newsletter.</li>
<li>Aucun profil de navigation ni mesure d'audience.</li>
</ul> </ul>
</section> </section>
</AnimatedContent> </AnimatedContent>
@@ -62,8 +59,9 @@ const Privacy = () => {
<p> <p>
Ce site n'utilise{" "} Ce site n'utilise{" "}
<strong>aucun cookie publicitaire ou de traçage</strong> (Google <strong>aucun cookie publicitaire ou de traçage</strong> (Google
Analytics, Pixels, etc.). L'unique contenu tiers (les actualités Analytics, Pixels, etc.). L'actualité de notre page Facebook —
de notre page Facebook) n'est chargé{" "} textes et images — est relayée par notre propre serveur et n'est
affichée{" "}
<strong>qu'après votre consentement explicite</strong> via la <strong>qu'après votre consentement explicite</strong> via la
bannière prévue à cet effet. bannière prévue à cet effet.
</p> </p>
@@ -79,7 +77,7 @@ const Privacy = () => {
<AnimatedContent distance={20} direction="vertical" delay={0.4}> <AnimatedContent distance={20} direction="vertical" delay={0.4}>
<section> <section>
<h2 className="text-2xl font-bold text-primary mb-4"> <h2 className="text-2xl font-bold text-primary mb-4">
4. Services Tiers 4. Contenus et services tiers
</h2> </h2>
<p className="mb-4"> <p className="mb-4">
Notre site utilise certaines fonctionnalités externes pour Notre site utilise certaines fonctionnalités externes pour
@@ -88,11 +86,13 @@ const Privacy = () => {
<ul className="list-disc pl-6 space-y-4 marker:text-hover-nav"> <ul className="list-disc pl-6 space-y-4 marker:text-hover-nav">
<li> <li>
<strong>Facebook / Meta :</strong> Nous affichons les <strong>Facebook / Meta :</strong> Nous affichons les
actualités publiques de notre page Facebook. Ce contenu n'est actualités publiques de notre page Facebook. Pour protéger
chargé qu'après votre accord. Aucune donnée vous concernant votre vie privée, les publications et les images ne sont pas
n'est envoyée à Facebook tant que vous n'avez pas accepté, chargées directement depuis les serveurs de Meta : elles
et vous pouvez à tout moment consulter la page via un lien transitent par notre propre serveur. Aucune donnée vous
direct sans charger le contenu intégré. concernant n'est transmise à Meta tant que vous n'avez pas
accepté, et vous pouvez à tout moment consulter la page via un
lien direct sans charger le contenu intégré.
</li> </li>
<li> <li>
<strong>HelloAsso / Leetchi :</strong> Les boutons de don <strong>HelloAsso / Leetchi :</strong> Les boutons de don
@@ -107,7 +107,38 @@ const Privacy = () => {
<AnimatedContent distance={20} direction="vertical" delay={0.5}> <AnimatedContent distance={20} direction="vertical" delay={0.5}>
<section> <section>
<h2 className="text-2xl font-bold text-primary mb-4"> <h2 className="text-2xl font-bold text-primary mb-4">
5. Contact 5. Hébergement et journaux
</h2>
<p>
Le site est hébergé sur une infrastructure dédiée située dans
l'Union européenne. Comme la plupart des serveurs web, celui-ci
peut enregistrer des données techniques (adresse IP, type de
navigateur, date et heure de connexion) à des fins de sécurité
et de bon fonctionnement. Ces journaux ne sont ni exploités à
des fins commerciales, ni cédés à des tiers.
</p>
</section>
</AnimatedContent>
<AnimatedContent distance={20} direction="vertical" delay={0.6}>
<section>
<h2 className="text-2xl font-bold text-primary mb-4">
6. Vos droits
</h2>
<p>
Conformément au Règlement Général sur la Protection des Données
(RGPD), vous disposez d'un droit d'accès, de rectification,
d'effacement et d'opposition sur les données vous concernant.
Pour exercer ces droits, vous pouvez nous contacter à l'adresse
indiquée ci-dessous.
</p>
</section>
</AnimatedContent>
<AnimatedContent distance={20} direction="vertical" delay={0.7}>
<section>
<h2 className="text-2xl font-bold text-primary mb-4">
7. Contact
</h2> </h2>
<p> <p>
Pour toute question concernant cette politique ou l'association, Pour toute question concernant cette politique ou l'association,