Réécriture SvelteKit statique (Svelte 5 runes + TS, adapter-static)

- Données PeerTube (GADE), Castopod (KUTE) et Mastodon (BOKANTE) bakées au
  build via +page.server.ts (throttle + retry 429 + déduplication)
- Charte OKI complète : tokens, thème sombre par défaut (clair opt-in,
  anti-FOUC), Archivo/Inter self-hébergées, flag-bar, sprite SVG (zéro emoji
  en interface, zéro Font Awesome/CDN)
- i18n FR/EN par routage [[locale]], bundles JSON, hreflang, %lang% serveur
- Pages : accueil, /video/[uuid] (embed, téléchargements, partage,
  commentaires, JSON-LD VideoObject), /categories/[id], /recherche (index
  JSON baké, recherche client), /direct (live + annonce multi-fuseaux),
  /dons, /mentions-legales, /offline + 404 kréyòl
- Motion gwoka : KineticText (scrub view()), ScrollProgressBar, FlagChip,
  reveal syncopé, View Transitions, gate prefers-reduced-motion unique
- PWA : manifest + Workbox generateSW (fallback /offline/), registerSW
  statique
- Sécurité : CSP par page en <meta> (SHA-256 des inline via
  scripts/postbuild-csp.mjs) + headers globaux (_headers Cloudflare et
  .htaccess o2switch), redirections des anciennes URLs PHP
- Doc : docs/DEPLOIEMENT-SVELTEKIT.md
This commit is contained in:
sucupira
2026-07-23 00:49:02 -04:00
parent 5b1a78782a
commit d6efb6736f
147 changed files with 14567 additions and 15145 deletions
+27
View File
@@ -0,0 +1,27 @@
import { prefersReducedMotion, syncopatedDelay } from './tokens';
export function reveal(node: HTMLElement, index = 0) {
if (prefersReducedMotion()) return;
node.classList.add('reveal');
node.style.setProperty('--d', `${syncopatedDelay(index)}ms`);
const observer = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
node.classList.add('is-visible');
observer.disconnect();
}
}
},
{ threshold: 0.1, rootMargin: '0px 0px -8% 0px' }
);
observer.observe(node);
return {
destroy() {
observer.disconnect();
}
};
}
+11
View File
@@ -0,0 +1,11 @@
export function prefersReducedMotion(): boolean {
if (typeof window === 'undefined') return true;
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
}
const SYNCOPATED_PATTERN = [0, 120, 300, 360, 600, 660, 900, 960];
export function syncopatedDelay(index: number): number {
const cycle = Math.floor(index / SYNCOPATED_PATTERN.length);
return SYNCOPATED_PATTERN[index % SYNCOPATED_PATTERN.length] + cycle * 1200;
}