mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-23 15:18:04 +02:00
- Fiches adhérents : URL canonique /adherents/12-au-bon-pain-frouard (memberPath). L'identifiant en tête suffit ; /adherents/12 et tout slug périmé sont redirigés de façon permanente vers la forme canonique, donc les anciens liens et les partages sociaux restent valides. Tous les liens (accueil, carrousel, annuaire, JSON-LD, sitemap, publications Facebook / LinkedIn) passent par memberPath. - Pages métier /annuaire/[categorie] : une page indexable par catégorie avec titre, introduction (effectif, communes), grille d'adhérents, fil d'Ariane et ItemList. Sans adhérent : noindex et hors sitemap. Section « Parcourir par métier » sur l'annuaire et « Autres métiers » sur chaque page pour le maillage interne. - Composants partagés MemberCard et CategoryLinks ; slugify déplacé dans src/lib/slug.ts. - Backend : conseils de rédaction sous les champs description et tags des formulaires adhérent (espace adhérent et fiche staff). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDbKbJrPWweXXYSxA8MXW7
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import Link from "next/link";
|
|
import { categoryPath } from "@/lib/seo";
|
|
|
|
export type CategoryLink = { slug: string; label: string; accent: string; memberCount: number };
|
|
|
|
/** Pastilles-liens vers les pages métier : contenu statique, lisible sans JavaScript. */
|
|
export function CategoryLinks({ categories, currentSlug }: { categories: CategoryLink[]; currentSlug?: string }) {
|
|
return (
|
|
<nav aria-label="Parcourir par métier" style={{ display: "flex", flexWrap: "wrap", gap: 9 }}>
|
|
{categories.map((c) => {
|
|
const active = c.slug === currentSlug;
|
|
return (
|
|
<Link
|
|
key={c.slug}
|
|
href={categoryPath(c.slug)}
|
|
aria-current={active ? "page" : undefined}
|
|
style={{
|
|
textDecoration: "none",
|
|
fontSize: 13.5,
|
|
fontWeight: 600,
|
|
padding: "8px 14px",
|
|
borderRadius: 999,
|
|
border: `1px solid ${active ? "#13324F" : "#e6dcc6"}`,
|
|
background: active ? "#13324F" : "#fff",
|
|
color: active ? "#fff" : "#3c3322",
|
|
display: "inline-flex",
|
|
alignItems: "center",
|
|
gap: 8,
|
|
}}
|
|
>
|
|
<span style={{ width: 7, height: 7, borderRadius: "50%", background: active ? "#E0A63C" : c.accent, flexShrink: 0 }} />
|
|
{c.label}
|
|
<span style={{ opacity: 0.6 }}>{c.memberCount}</span>
|
|
</Link>
|
|
);
|
|
})}
|
|
</nav>
|
|
);
|
|
}
|