--- /** * BaseLayout — coquille HTML commune à tous les sites. * * Props : * - title (string, requis) : + og:title * - description (string) : meta description + og:description * - lang (string, 'fr') : attribut lang du <html> * - ogImage (string) : URL absolue de l'image OG * - canonical (string) : URL canonique * * Slots : default (contenu du <main>), header, footer, head (metas en plus). * * Le THÈME n'est pas importé ici : le site importe son theme/*.css dans son * propre layout, à côté de <BaseLayout> (cf. README). * Gestion clair/sombre : data-theme posé avant le premier paint depuis * localStorage('tf-theme') ; helper global window.tfSetTheme('dark'|'light'|'auto'). */ import '../tokens.css'; import '../reset.css'; interface Props { title: string; description?: string; lang?: string; ogImage?: string; canonical?: string; } const { title, description, lang = 'fr', ogImage, canonical } = Astro.props; --- <html lang={lang}> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{title} {description && } {canonical && } {description && } {ogImage && } Aller au contenu