diff --git a/web/src/components/PastEventCard.jsx b/web/src/components/PastEventCard.jsx index 3d9b33f..80fe035 100644 --- a/web/src/components/PastEventCard.jsx +++ b/web/src/components/PastEventCard.jsx @@ -1,10 +1,12 @@ import { useState } from 'react'; import Carousel from './Carousel.jsx'; +import Modal from './Modal.jsx'; -// Editorial card for one past event: text on the left, a 1-large-+-2-small -// photo grid on the right. Clicking any photo (or "voir les N photos") -// opens the full carousel with every photo. -export default function PastEventCard({ event }) { +// Editorial summary for one past event. The list keeps a controlled excerpt; +// clicking the card opens the complete story and gallery, then a photo can be +// enlarged in the full-screen carousel. +export default function PastEventCard({ event, excerptLines = 2 }) { + const [detailOpen, setDetailOpen] = useState(false); const [carouselAt, setCarouselAt] = useState(null); // null | index const photos = event.photos || []; const hasPhotos = photos.length > 0; @@ -14,8 +16,7 @@ export default function PastEventCard({ event }) { return (
{ e.stopPropagation(); setCarouselAt(idx); } : undefined} + style={{ borderRadius: 3, overflow: 'hidden', ...extra }} > {photo && }
@@ -26,23 +27,21 @@ export default function PastEventCard({ event }) { <>
setCarouselAt(0) : undefined} + style={{ display: 'grid', gridTemplateColumns: '1.15fr .85fr', gap: 40, alignItems: 'center', padding: 36, cursor: 'pointer' }} + onClick={() => setDetailOpen(true)} >
{event.date_label} · {event.lieu}

{event.titre}

-

{event.texte}

+

{event.texte}

👥 {event.participants} participants 📷 {event.nb_photos} photo{event.nb_photos > 1 ? 's' : ''} - {hasPhotos && ( - - )} +
@@ -50,8 +49,7 @@ export default function PastEventCard({ event }) { {cell(1)} {photos.length > 3 ? (
{ e.stopPropagation(); setCarouselAt(2); }} + style={{ borderRadius: 3, overflow: 'hidden', position: 'relative' }} >
@@ -64,6 +62,51 @@ export default function PastEventCard({ event }) {
+ {detailOpen && ( + setDetailOpen(false)} + maxWidth={920} + header={{ + kicker: 'Rencontre passée', + title: event.titre, + meta: `${event.date_label} · ${event.lieu}`, + }} + > +
+
+ 👥 {event.participants} participants + 📷 {event.nb_photos} photo{event.nb_photos > 1 ? 's' : ''} +
+
+ {event.texte} +
+ + {hasPhotos ? ( +
+

Toutes les photos

+
+ {photos.map((photo, index) => ( + + ))} +
+
+ ) : ( +

+ Aucune photo n'a encore été ajoutée à cette soirée. +

+ )} +
+
+ )} + {carouselAt !== null && ( setCarouselAt(null)} /> )} diff --git a/web/src/pages/Home.jsx b/web/src/pages/Home.jsx index f97989c..3b1d169 100644 --- a/web/src/pages/Home.jsx +++ b/web/src/pages/Home.jsx @@ -364,7 +364,7 @@ export default function Home() {
{passees.slice(0, 3).map((p) => ( - + ))}