feat: migre le site vers SvelteKit (Svelte 5, statique, zéro tiers)
- Rebuild complet SvelteKit 2 + Svelte 5 runes + TypeScript, adapter-static - Images self-hébergées optimisées au build (vite-imagetools), fonts Archivo/Inter en woff2 local — BunnyCDN et Google Fonts supprimés (corrige les 403 d'images) - Tokens charte OKI, thème sombre par défaut / clair opt-in, zéro emoji (set SVG) - Motion : KineticText (stagger syncopé gwoka), ScrollProgressBar, View Transitions - Village SVG isométrique pour les services hébergés + fallback accessible - PWA (manifest + SW hors-ligne), 404 en KA, CSP nettoyée (.htaccess + _headers) - Lighthouse mobile : 91/100/100/100 — JS initial 67 Ko gzip
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
<script lang="ts">
|
||||
import { getBundle, alternatePath, type Locale } from '$lib/i18n';
|
||||
|
||||
interface Props {
|
||||
/** Titre de page (sans le nom du site). Absent = home. */
|
||||
title?: string;
|
||||
description?: string;
|
||||
/** Chemin canonique courant, ex. `/dons/`. */
|
||||
path: string;
|
||||
locale: Locale;
|
||||
}
|
||||
|
||||
let { title, description, path, locale }: Props = $props();
|
||||
|
||||
const site = $derived(getBundle(locale).site);
|
||||
const altLocale: Locale = $derived(locale === 'fr' ? 'en' : 'fr');
|
||||
const altPath = $derived(alternatePath(path, altLocale));
|
||||
|
||||
const fullTitle = $derived(title ? `${title} | ${site.name}` : `${site.name} | ${site.shortName}`);
|
||||
const ogTitle = $derived(title ?? `${site.name} - ${site.og_tagline}`);
|
||||
const desc = $derived(description ?? site.description);
|
||||
const canonical = $derived(`https://o-k-i.net${path}`);
|
||||
|
||||
const orgJsonLd = $derived(
|
||||
JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Organization',
|
||||
name: site.name,
|
||||
alternateName: site.shortName,
|
||||
url: 'https://o-k-i.net',
|
||||
logo: 'https://o-k-i.net/images/logo-512x512.png',
|
||||
description: site.description,
|
||||
address: {
|
||||
'@type': 'PostalAddress',
|
||||
streetAddress: '36 Rue Lethière',
|
||||
addressLocality: 'Basse-Terre',
|
||||
postalCode: '97100',
|
||||
addressCountry: 'GP'
|
||||
},
|
||||
contactPoint: {
|
||||
'@type': 'ContactPoint',
|
||||
email: 'kontak@o-k-i.net',
|
||||
contactType: 'customer service'
|
||||
},
|
||||
sameAs: [
|
||||
'https://niyaj.o-k-i.net/',
|
||||
'https://kute.o-k-i.net/',
|
||||
'https://labola.o-k-i.net/',
|
||||
'https://liberapay.com/OKI/donate'
|
||||
],
|
||||
foundingDate: '2024',
|
||||
nonprofitStatus: 'NonprofitANBI'
|
||||
})
|
||||
);
|
||||
|
||||
const djangokamJsonLd = JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'MusicGroup',
|
||||
name: 'DJANGOKAM',
|
||||
genre: ['Reggae', 'Zouk', 'Konpa', 'K-pop'],
|
||||
url: 'https://djangokam.pawol.nu',
|
||||
sameAs: ['https://djangokam.pawol.nu'],
|
||||
member: {
|
||||
'@type': 'Organization',
|
||||
name: 'ORGANISATION KA INTERNATIONALE',
|
||||
url: 'https://o-k-i.net'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{fullTitle}</title>
|
||||
<meta name="description" content={desc} />
|
||||
<meta name="keywords" content={site.keywords} />
|
||||
<meta name="author" content={site.name} />
|
||||
|
||||
<link rel="canonical" href={canonical} />
|
||||
<link rel="alternate" hreflang={locale} href={canonical} />
|
||||
<link rel="alternate" hreflang={altLocale} href={`https://o-k-i.net${altPath}`} />
|
||||
<link rel="alternate" hreflang="x-default" href="https://o-k-i.net/" />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={canonical} />
|
||||
<meta property="og:title" content={ogTitle} />
|
||||
<meta property="og:description" content={desc} />
|
||||
<meta property="og:image" content="https://o-k-i.net/images/logo-512x512.png" />
|
||||
<meta property="og:image:width" content="512" />
|
||||
<meta property="og:image:height" content="512" />
|
||||
<meta property="og:image:alt" content="Logo {site.name}" />
|
||||
<meta property="og:locale" content={site.og_locale} />
|
||||
<meta property="og:site_name" content={site.name} />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:url" content={canonical} />
|
||||
<meta name="twitter:title" content={ogTitle} />
|
||||
<meta name="twitter:description" content={desc} />
|
||||
<meta name="twitter:image" content="https://o-k-i.net/images/logo-512x512.png" />
|
||||
<meta name="twitter:image:alt" content="Logo {site.name}" />
|
||||
|
||||
{@html `<script type="application/ld+json">${orgJsonLd}</script>`}
|
||||
{@html `<script type="application/ld+json">${djangokamJsonLd}</script>`}
|
||||
</svelte:head>
|
||||
Reference in New Issue
Block a user