Repository Public
1import Link from "next/link";2import { Wordmark } from "@/components/ui/Logo";3import { credit } from "@/lib/labels";4import type { CourseView } from "@/modules/content-schema";56export function Footer({ course }: { course: CourseView }) {7 const groups: { title: string; links: [string, string][] }[] = [8 { title: "Le cours", links: [["/programme", "Programme"], ["/parcours", "Parcours suggérés"], ["/laboratoires", "Laboratoires"], ["/ressources", "Ressources"], ["/glossaire", "Glossaire"], ...(course.diagrams.length ? [["/schemas", "Schémas interactifs"] as [string, string]] : [])] },9 { title: "La plateforme", links: [["/a-propos", "À propos"], ["/recherche", "Recherche"], ["/accessibilite", "Accessibilité"], ["/confidentialite", "Confidentialité"], ["/conditions", "Conditions d’utilisation"]] },10 ];11 return (12 <footer className="site-chrome no-print mt-24 border-t border-line bg-surface">13 <div className="shell grid gap-10 py-14 md:grid-cols-[1.6fr_1fr_1fr]">14 <div className="max-w-md">15 <Wordmark />16 <p className="mt-4 text-[0.95rem] text-muted">{course.course.tagline}.</p>17 <p className="mt-4 text-[0.95rem]"><span className="font-medium">{credit(course.author)}</span></p>18 <p className="mt-3 text-sm text-faint">{course.course.endorsementNotice}</p>19 </div>20 {groups.map((g) => (21 <nav key={g.title} aria-label={g.title}>22 <h2 className="eyebrow !font-mono">{g.title}</h2>23 <ul className="mt-4 grid gap-2.5 text-[0.95rem]">24 {g.links.map(([href, label]) => <li key={href}><Link href={href} className="text-muted hover:text-fg hover:underline">{label}</Link></li>)}25 </ul>26 </nav>27 ))}28 </div>29 <div className="border-t border-line">30 <div className="shell flex flex-col gap-2 py-5 text-sm text-faint sm:flex-row sm:items-center sm:justify-between">31 <p>Aucun compte, aucun témoin de suivi, aucune mesure d’audience. Votre progression reste dans votre navigateur.</p>32 <Link href="/confidentialite#mes-donnees" className="link shrink-0">Effacer mes données locales</Link>33 </div>34 </div>35 </footer>36 );37}38