spb/wp-spboucher-ai
Public
1import Link from "next/link";2import { href, t, type Locale } from "@/lib/i18n";3export function SiteFooter({ locale, attribution, institution }: { locale: Locale; attribution: { en: string; fr: string } | null; institution: { name_en: string; name_fr: string; department_en?: string; department_fr?: string; url?: string } | null }) {4 const d = t(locale); const year = new Date().getFullYear();5 return (6 <footer className="mt-16 border-t border-line bg-bg-3/60">7 <div className="container py-10 grid gap-8 md:grid-cols-3 text-sm">8 <div>9 <p className="serif text-lg text-fg">{d.site.title}</p>10 <p className="text-fg-3 mt-1">{d.site.secondary}</p>11 {institution && <p className="text-fg-2 mt-3">{locale === "fr" ? institution.name_fr : institution.name_en}{(locale === "fr" ? institution.department_fr : institution.department_en) ? ` · ${locale === "fr" ? institution.department_fr : institution.department_en}` : ""}</p>}12 </div>13 <div>14 <p className="label mb-2">{d.footer.attribution}</p>15 <p className="text-fg-2 leading-relaxed">{attribution ? (locale === "fr" ? attribution.fr : attribution.en) : ""}</p>16 </div>17 <div className="grid grid-cols-2 gap-x-4 gap-y-1.5">18 {[["/papers", d.nav.papers], ["/series", d.nav.series], ["/topics", d.nav.topics], ["/methods", d.nav.methods], ["/datasets", d.nav.datasets], ["/authors", d.nav.authors], ["/research-map", d.nav.map], ["/timeline", d.nav.timeline], ["/search", d.nav.search], ["/citation", d.nav.citation], ["/about", d.nav.about]].map(([p, l]) => <Link key={p} href={href(locale, p)} className="text-fg-2 no-underline hover:underline">{l}</Link>)}19 <Link href="/api/docs" className="text-fg-2 no-underline hover:underline">{d.nav.api}</Link>20 <a href="/feed.xml" className="text-fg-2 no-underline hover:underline">{d.footer.feed}</a>21 <a href="/api/oai?verb=Identify" className="text-fg-2 no-underline hover:underline">{d.footer.oai}</a>22 <a href="/sitemap.xml" className="text-fg-2 no-underline hover:underline">{d.footer.sitemap}</a>23 <Link href="/admin" className="text-fg-3 no-underline hover:underline">{d.nav.admin}</Link>24 </div>25 </div>26 <div className="container pb-8 text-xs text-fg-3 flex flex-wrap gap-x-4 gap-y-1">27 <span>© {year} Simon-Pierre Boucher.</span><span>{d.footer.rights}</span><span>{d.footer.built}</span>28 </div>29 </footer>30 );31}32