Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : agentilab-web8 * File : components/marketing/blocks.tsx9 * Module : User Interface10 * Repository : https://git.spboucher.ai/agentilab-web11 * Project Website : Not specified12 * Created : 2026-12-0513 * Last Modified : 2026-12-0514 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : Proprietary34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import Image from 'next/image';44import Link from 'next/link';45import type { ReactNode } from 'react';46import type { Locale } from '@/lib/i18n/config';47import { formatDate } from '@/lib/i18n/config';48import { getCopy } from '@/lib/i18n/copy';49import { href } from '@/lib/i18n/routes';50import type { RouteId } from '@/lib/i18n/routes';51import type { Brand, Milestone, PublicProduct, Technology } from '@/lib/catalog/types';52import { legalIdentity } from '@/content/public/legal';53import { Breadcrumbs } from '@/components/layout/Breadcrumbs';54import { Container, ExternalLink } from '@/components/ui/primitives';5556/** En-tête des pages intérieures : fil d’Ariane, titre unique, chapeau. */57export function PageHead({ id, locale, eyebrow, title, lead, children }: { id: RouteId; locale: Locale; eyebrow: string; title: string; lead?: string; children?: ReactNode }) {58 return (59 <div className="page-head" data-tone="light">60 <Container>61 <Breadcrumbs id={id} locale={locale} />62 <span className="eyebrow">{eyebrow}</span>63 <h1>{title}</h1>64 {lead ? <p className="lead rise rise--2">{lead}</p> : null}65 {children}66 </Container>67 </div>68 );69}7071interface BrandCardProps {72 brand: Brand;73 products: PublicProduct[];74 locale: Locale;75 route: RouteId;76 cta: string;77 /** Identifiant du produit mis en évidence dans l’aperçu. */78 highlight?: string;79 heading?: 'h2' | 'h3';80 /** Nombre de produits montrés dans l’aperçu ; les autres sont résumés. */81 preview?: number;82}8384export function BrandCard({ brand, products, locale, route, cta, highlight, heading = 'h3', preview = 6 }: BrandCardProps) {85 const copy = getCopy(locale);86 const Heading = heading;87 const shown = products.slice(0, preview);88 const rest = products.length - shown.length;89 return (90 <article className="card brand-card">91 <div>92 <span className="eyebrow brand-card__tag">{brand.tagline[locale]}</span>93 <Heading className="brand-card__name">{brand.name}</Heading>94 </div>95 <p>{brand.summary[locale]}</p>96 <div>97 <span className="sr-only">{copy.home.portfolio.productsLabel} :</span>98 <ul className="brand-card__products">99 {shown.map((product) => (100 <li key={product.id} className={product.id === highlight ? 'chip chip--highlight' : 'chip'}>101 {product.icon ? <Image src={product.icon.src} width={18} height={18} alt="" unoptimized={product.icon.src.endsWith('.svg')} /> : null}102 {product.name[locale]}103 </li>104 ))}105 {rest > 0 ? <li className="chip">{copy.home.portfolio.more(rest)}</li> : null}106 </ul>107 </div>108 <div className="brand-card__links">109 <Link href={href(route, locale)} className="arrow-link">110 {cta}111 </Link>112 <ExternalLink href={brand.officialUrl[locale]} externalLabel={copy.labels.external}>113 {brand.officialLabel}114 </ExternalLink>115 </div>116 </article>117 );118}119120export function TechnologyCard({ tech, index, locale, detail = false, link }: { tech: Technology; index: number; locale: Locale; detail?: boolean; link?: { href: string; label: string } }) {121 return (122 <li className="tile" id={detail ? tech.id : undefined}>123 <span className="tile__index" aria-hidden="true">124 {String(index + 1).padStart(2, '0')}125 </span>126 <h3>{tech.title[locale]}</h3>127 <p>{tech.text[locale]}</p>128 {detail ? <p className="tile__detail">{tech.detail[locale]}</p> : null}129 {link ? (130 <Link href={`${link.href}#${tech.id}`} className="arrow-link small">131 {link.label}132 <span className="sr-only"> : {tech.title[locale]}</span>133 </Link>134 ) : null}135 </li>136 );137}138139export function Timeline({ items, locale }: { items: Milestone[]; locale: Locale }) {140 return (141 <ol className="timeline">142 {items.map((item) => (143 <li key={item.date}>144 <time dateTime={item.date}>{formatDate(item.date, locale)}</time>145 <h3>{item.title[locale]}</h3>146 <p>{item.text[locale]}</p>147 </li>148 ))}149 </ol>150 );151}152153/** Bloc institutionnel : faits publics du registre, rien d’autre. */154export function LegalFacts({ locale }: { locale: Locale }) {155 const t = getCopy(locale).company.legalFacts;156 const id = legalIdentity;157 const rows: [string, ReactNode][] = [158 [t.legalName, <span key="n" lang="fr-CA">{id.legalName}</span>],159 [t.neq, id.neq],160 [t.form, id.form[locale]],161 [t.statute, id.statute[locale]],162 [t.constitutedOn, <time key="c" dateTime={id.constitutedOn}>{formatDate(id.constitutedOn, locale)}</time>],163 [t.registeredOn, <time key="r" dateTime={id.registeredOn}>{formatDate(id.registeredOn, locale)}</time>],164 [t.president, id.president],165 [t.activity, `${id.activity[locale]} (${t.caePrefix} ${id.caeCode})`],166 [t.location, id.location[locale]],167 [t.source, t.sourceValue(id.registrySource[locale], formatDate(id.registryDate, locale))],168 ];169 return (170 <dl className="legal-facts">171 {rows.map(([term, value]) => (172 <div key={term}>173 <dt>{term}</dt>174 <dd>{value}</dd>175 </div>176 ))}177 </dl>178 );179}180181/** Données structurées. Le contenu est sérialisé par nos soins : « < » est échappé pour ne jamais fermer la balise. */182export function JsonLd({ data }: { data: object }) {183 return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(data).replace(/</g, '\\u003c') }} />;184}185