add privacy page as standalone SPA view outside slide navigation

- New Kirby template/blueprint/JSON for privacy page (confidentialite slug)
- Standalone page state in slides store + router handling for non-nav pages
- Privacy.svelte view with background image, text blocks, footer
- Centralize vertical lines in App.svelte as fixed elements with per-slide visibility
- Footer privacy link language-aware (FR/EN)
- Portfolio mockup fix: read from default language for consistent EN display
- menu.php: add privacy page to Kirby panel navigation

refs #44

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-30 18:43:35 +02:00
parent b12b839f1b
commit 44af8a9b4e
11 changed files with 259 additions and 50 deletions

View file

@ -64,7 +64,12 @@ async function loadSlide(path) {
siteInitialized = true;
}
slides.setData(slidePath, data);
const finalIdx = slides.getIndexByPath(slidePath);
if (finalIdx !== -1) {
slides.setData(slidePath, data);
} else {
slides.setStandalone(data);
}
} catch (error) {
console.error(`[router] Failed to load slide ${slidePath}:`, error);
slides.setLoading(slidePath, false);
@ -95,21 +100,26 @@ export function slideTo(path, { skipHistory = false } = {}) {
const idx = findSlideIndex(path);
const slidePath = idx !== -1 ? slides.all[idx].path : path;
if (idx !== -1 && slides.all[idx].title) {
document.title = `World Game - ${slides.all[idx].title}`;
}
if (idx !== -1) {
slides.clearStandalone();
// Si on navigue vers la slide déjà active (ex: clic sur "Blog" depuis un article),
// déclencher popstate pour que la vue puisse réagir au changement d'URL.
if (idx === slides.activeIndex && !skipHistory) {
window.dispatchEvent(new PopStateEvent('popstate'));
return;
}
if (slides.all[idx].title) {
document.title = `World Game - ${slides.all[idx].title}`;
}
slides.slideTo(slidePath);
if (idx === slides.activeIndex && !skipHistory) {
window.dispatchEvent(new PopStateEvent('popstate'));
return;
}
if (idx !== -1 && !slides.all[idx].loaded) {
loadSlide(slidePath);
slides.slideTo(slidePath);
if (!slides.all[idx].loaded) {
loadSlide(slidePath);
}
} else {
// Page standalone (hors navigation)
loadSlide(path);
}
}