Commit bb12d4e8 by PLN (Algolia)

les-femmes: mini-site for the women behind the 34 personnages — punchlines and…

les-femmes: mini-site for the women behind the 34 personnages — punchlines and enquête anecdotes verbatim (raw data rule: never rephrased), verdict labels from the inquiry table, era filters, per-femme pages minted from generateStaticParams
parent ecfe91ef
"use client";
import { useMemo, useState } from "react";
import Link from "next/link";
import { ERAS, VERDICT_META, getImage } from "./data";
import style from "./style.module.css";
export default function LesFemmesFilter({ personnages, femmesBySlug }) {
const [era, setEra] = useState(null);
const visible = useMemo(
() => (era ? personnages.filter((p) => p.era === era) : personnages),
[personnages, era]
);
return (
<>
<div className={style.filters}>
<button className={era === null ? `${style.chip} ${style.chipOn}` : style.chip} onClick={() => setEra(null)}>
Tout ({personnages.length})
</button>
{ERAS.map((e) => {
const n = personnages.filter((p) => p.era === e.key).length;
return (
<button
key={e.key}
className={era === e.key ? `${style.chip} ${style.chipOn}` : style.chip}
onClick={() => setEra(e.key)}
>
{e.label} ({n})
</button>
);
})}
</div>
<div className={style.grid}>
{visible.map((p) => {
const firstFemme = p.femmes.length > 0 ? femmesBySlug[p.femmes[0]] : null;
const meta = VERDICT_META[p.verdict];
const img = firstFemme ? getImage(firstFemme.slug) : null;
const card = (
<>
<div className={style.avatarWrap}>
{img ? (
<img
className={style.avatarImg}
src={`/images/les-femmes/${img.file}`}
alt=""
loading="lazy"
decoding="async"
/>
) : (
<span className={style.avatarMono} style={{ background: `${meta.color}22`, color: meta.color }}>
{(firstFemme?.name ?? p.name).slice(0, 1)}
</span>
)}
</div>
<div className={style.cardTop}>
<h3 className={style.name}>{p.name}</h3>
<span className={style.badge} style={{ background: meta.color }} title={p.verdictLabel}>
{meta.label}
</span>
</div>
<p className={p.punchline ? style.punchline : `${style.punchline} ${style.punchlineMissing}`}>
{p.punchline ? `« ${p.punchline} »` : "punchline à compléter"}
</p>
{firstFemme && (
<p className={style.femmes}>
derrière : <strong>{firstFemme.name}</strong>
</p>
)}
{!firstFemme && p.verdict === "rien" && (
<p className={style.femmes}>
<em>{p.verdictLabel.toLowerCase()}</em>
</p>
)}
</>
);
return firstFemme ? (
<Link key={p.slug} href={`/les-femmes/${firstFemme.slug}`} className={`${style.card} ${style.cardLink}`}>
{card}
</Link>
) : (
<div key={p.slug} className={style.card}>
{card}
</div>
);
})}
</div>
</>
);
}
import Link from "next/link";
import { FEMMES, VERDICT_META, getImage, getFemme, getPersonnage } from "../data";
import style from "../style.module.css";
export function generateStaticParams() {
return FEMMES.map((f) => ({ femme: f.slug }));
}
export async function generateMetadata({ params }) {
const { femme: slug } = await params;
const femme = getFemme(slug);
if (!femme) return {};
return {
title: `${femme.name} — Les femmes derrière « Comment ça va ce matin ? »`,
description: femme.entries.map((e) => e.text).join(" ").slice(0, 160),
};
}
export default async function FemmePage({ params }) {
const { femme: slug } = await params;
const femme = getFemme(slug);
if (!femme) return null;
const meta = VERDICT_META[femme.verdict];
const img = getImage(femme.slug);
const commonsUrl = img
? `https://commons.wikimedia.org/wiki/File:${encodeURIComponent(img.commons)}`
: null;
const linked = femme.wikipedia?.fr
? `https://fr.wikipedia.org/wiki/${encodeURIComponent(femme.wikipedia.fr)}`
: femme.wikipedia?.en
? `https://en.wikipedia.org/wiki/${encodeURIComponent(femme.wikipedia.en)}`
: null;
return (
<main className={style.root}>
<header className={style.femmeHeader}>
<h1 className={style.femmeName}>{femme.name}</h1>
<p className={style.personnageRef}>
<span className={style.badge} style={{ background: meta.color }}>
{femme.verdictLabel}
</span>
{" — "}
derrière{" "}
{femme.personnages.map((slug2, i) => {
const p = getPersonnage(slug2);
return (
<span key={slug2}>
{i > 0 && " et "}
<strong>{p?.name ?? slug2}</strong>
{p?.punchline ? <> (« {p.punchline} »)</> : null}
</span>
);
})}
</p>
</header>
{img && (
<figure className={style.portrait}>
<img
src={`/images/les-femmes/${img.file}`}
alt={`Portrait de ${femme.name}`}
loading="eager"
decoding="async"
/>
</figure>
)}
{img && (
<p className={style.credit}>
Image :{" "}
<a href={commonsUrl} target="_blank" rel="noopener noreferrer">
{img.commons}
</a>{" "}
— Wikimedia Commons
</p>
)}
{femme.entries.map((entry) => (
<section key={entry.personnage} className={style.entry}>
<h2 className={style.entryTitle}>{getPersonnage(entry.personnage)?.name}</h2>
<p className={style.entryText}>{entry.text}</p>
</section>
))}
<div className={style.links}>
{linked && (
<>
<h2>Wikipédia</h2>
<ul>
<li>
<a href={linked} target="_blank" rel="noopener noreferrer">
{femme.wikipedia.fr ? "fr.wikipedia.org" : "en.wikipedia.org"}
</a>
</li>
</ul>
</>
)}
{femme.sources.length > 0 && (
<>
<h2>Sources</h2>
<ul>
{femme.sources.map((s) => (
<li key={s.label}>{s.label}</li>
))}
</ul>
</>
)}
</div>
<Link href="/les-femmes/" className={style.back}>
← les 34 personnages
</Link>
</main>
);
}
import Link from "next/link";
import LesFemmesFilter from "./LesFemmesFilter";
import { FEMMES, PERSONNAGES } from "./data";
import style from "./style.module.css";
export const metadata = {
title: "Les femmes derrière « Comment ça va ce matin ? »",
description:
"Enquête sur les 34 personnages du mème : les femmes éclipsées, effacées, moquées ou exclues derrière les grands noms.",
};
const EN_BREF = `Sur les 34 personnages, 27 font apparaître une femme éclipsée, effacée, moquée ou exclue ; 6 n'ont rien de documenté ; Œdipe est une fiction. Parmi les 27, deux cas à part : Nietzsche, où c'est une femme qui a déformé l'œuvre, et Einstein, où le soupçon reste non prouvé. Le vol pur et prouvé est rare, le cas le plus net étant Freud avec Sabina Spielrein. Le schéma dominant est l'éclipse : une femme travaille, finance, traduit ou inspire, et l'histoire ne retient que l'homme.`;
const LEGENDE = {
appropriation: "idée ou travail repris avec un crédit minimal",
"éclipse": "contribution réelle, minimisée par la postérité",
effacement: "femme rayée du récit",
exclusion: "femme réduite au silence ou moquée",
};
export default function LesFemmesIndex() {
const femmesBySlug = Object.fromEntries(FEMMES.map((f) => [f.slug, f]));
return (
<main className={style.root}>
<h1 className={style.heroTitle}>
<Link href="/les-femmes/">Les femmes derrière « Comment ça va ce matin ? »</Link>
</h1>
<p className={style.heroSub}>Enquête sur les 34 personnages du mème · 8 novembre 2026</p>
<div className={style.enBref}>{EN_BREF}</div>
<p className={style.legend}>
Légende :{" "}
{Object.entries(LEGENDE).map(([k, v], i) => (
<span key={k}>
{i > 0 && " ; "}
<strong>{k}</strong> = {v}
</span>
))}
.
</p>
<LesFemmesFilter personnages={PERSONNAGES} femmesBySlug={femmesBySlug} />
</main>
);
}
/* les-femmes — micro-brand styles. Coexists with global Tailwind reset. */
.root {
max-width: 72rem;
margin: 0 auto;
padding: 2.5rem 1.25rem 5rem;
color: #2d2a32;
}
.heroTitle {
font-size: clamp(1.9rem, 5vw, 3rem);
line-height: 1.15;
margin: 0 0 0.75rem;
}
.heroTitle a {
color: inherit;
text-decoration: none;
}
.heroSub {
font-size: 1.05rem;
color: #5f5a66;
margin: 0 0 1.5rem;
max-width: 46rem;
}
.enBref {
background: #f7f3f8;
border-left: 3px solid #7b3f8c;
border-radius: 0 8px 8px 0;
padding: 1rem 1.25rem;
font-size: 0.95rem;
line-height: 1.6;
max-width: 60rem;
margin: 0 0 2rem;
}
.legend {
font-size: 0.85rem;
color: #5f5a66;
line-height: 1.6;
margin: 0 0 2.5rem;
max-width: 60rem;
}
.legend strong {
color: #2d2a32;
}
.filters {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0 0 1.5rem;
}
.chip {
border: 1px solid #d9d2e0;
background: transparent;
border-radius: 999px;
padding: 0.3rem 0.8rem;
font-size: 0.82rem;
cursor: pointer;
color: #5f5a66;
transition: all 120ms ease;
}
.chip:hover {
border-color: #7b3f8c;
color: #2d2a32;
}
.chipOn {
background: #2d2a32;
border-color: #2d2a32;
color: #fff;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
gap: 1rem;
}
.card {
position: relative;
display: flex;
flex-direction: column;
gap: 0.6rem;
border: 1px solid #e4dee8;
border-radius: 12px;
padding: 1.1rem 1.1rem 1rem;
background: #fff;
text-decoration: none;
color: inherit;
transition: border-color 120ms ease, transform 120ms ease;
}
.cardLink:hover {
border-color: #7b3f8c;
transform: translateY(-2px);
}
.cardTop {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 0.5rem;
}
.name {
font-size: 1.05rem;
font-weight: 700;
margin: 0;
}
.punchline {
font-size: 0.95rem;
line-height: 1.45;
margin: 0;
color: #2d2a32;
font-style: italic;
}
.punchlineMissing {
font-size: 0.85rem;
color: #a0a0a8;
font-style: normal;
}
.femmes {
font-size: 0.85rem;
color: #5f5a66;
margin: auto 0 0;
padding-top: 0.4rem;
}
.femmes strong {
font-weight: 600;
color: #7b3f8c;
}
.badge {
display: inline-block;
font-size: 0.68rem;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
color: #fff;
border-radius: 4px;
padding: 0.15rem 0.45rem;
white-space: nowrap;
}
.count {
font-size: 0.8rem;
color: #a0a0a8;
margin: 0 0 1rem;
}
/* Avatar de card : carré réservé (CLS zéro), cover, monogramme sinon. */
.avatarWrap {
width: 3.75rem;
height: 3.75rem;
border-radius: 8px;
overflow: hidden;
flex-shrink: 0;
}
.avatarImg {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.avatarMono {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: 1.6rem;
font-weight: 700;
}
/* Portrait de fiche : même contrat, format plus grand. */
.portrait {
width: 100%;
max-width: 22rem;
aspect-ratio: 4 / 3;
border-radius: 12px;
overflow: hidden;
margin: 0 0 0.4rem;
}
.portrait img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: top;
display: block;
}
.credit {
font-size: 0.75rem;
color: #a0a0a8;
max-width: 22rem;
margin: 0 0 2rem;
}
.credit a {
color: #a0a0a8;
}
/* Femme page */
.femmeHeader {
margin: 0 0 2rem;
}
.femmeName {
font-size: clamp(1.7rem, 4vw, 2.5rem);
margin: 0 0 0.5rem;
}
.personnageRef {
font-size: 0.95rem;
color: #5f5a66;
margin: 0 0 0.75rem;
}
.entry {
margin: 0 0 2.25rem;
max-width: 44rem;
}
.entryTitle {
font-size: 1.15rem;
font-weight: 700;
margin: 0 0 0.6rem;
}
.entryText {
font-size: 1rem;
line-height: 1.7;
margin: 0;
white-space: pre-line;
}
.links {
margin: 2.5rem 0 0;
padding-top: 1.25rem;
border-top: 1px solid #e4dee8;
font-size: 0.9rem;
max-width: 44rem;
}
.links h2 {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #a0a0a8;
margin: 0 0 0.5rem;
}
.links ul {
list-style: none;
margin: 0 0 1rem;
padding: 0;
}
.links li {
margin: 0 0 0.3rem;
}
.links a {
color: #7b3f8c;
}
.back {
display: inline-block;
margin-top: 2.5rem;
font-size: 0.9rem;
color: #5f5a66;
text-decoration: none;
}
.back:hover {
color: #2d2a32;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment