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

@ -0,0 +1,41 @@
title: Confidentialité
icon: lock
tabs:
content:
label: Contenu
icon: text
columns:
- width: 1/3
fields:
backgroundImage:
label: Image de fond
type: files
max: 1
layout: cards
accept: image/*
translate: false
- width: 2/3
fields:
body:
label: Corps
type: blocks
fieldsets:
text:
extends: blocks/text
fields:
text:
headings:
- 3
nodes:
- heading
marks:
- bold
- italic
- underline
- strike
- link
files: tabs/files
seo: seo/page

View file

@ -30,7 +30,8 @@ return [
'jouer' => menuItem('jouer', 'Jouer', 'play', 'pages/jouer'),
'a-propos' => menuItem('a-propos', 'À propos', 'users', 'pages/a-propos'),
'blog' => menuItem('blog', 'Blog', 'text', 'pages/blog'),
'white-papers' => menuItem('livres-blancs', 'Livres blancs', 'book', 'pages/livres-blancs'),
'white-papers' => menuItem('livres-blancs', 'Livres blancs', 'book', 'pages/livres-blancs'),
'confidentialite' => menuItem('confidentialite', 'Confidentialité', 'lock', 'pages/confidentialite'),
'-',
'users',
'system',

View file

@ -1,8 +1,11 @@
<?php
$defaultLang = kirby()->defaultLanguage()->code();
$specificData = [
'backgroundImage' => $page->backgroundImage()->toFile()?->url(),
'projects' => $page->children()->listed()->map(function($project) {
'projects' => $page->children()->listed()->map(function($project) use ($defaultLang) {
$mockupFile = $project->content($defaultLang)->mockup()->toFile();
return [
'title' => $project->title()->value(),
'slug' => $project->slug(),
@ -14,9 +17,9 @@ $specificData = [
'srcset' => $f->srcset('gallery'),
'webp' => $f->srcset('gallery-webp'),
])->values(),
'mockup' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->url(),
'mockupSrcset' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->srcset('mockup'),
'mockupWebp' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->srcset('mockup-webp'),
'mockup' => $mockupFile?->url(),
'mockupSrcset' => $mockupFile?->srcset('mockup'),
'mockupWebp' => $mockupFile?->srcset('mockup-webp'),
'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical',
'secondsPerImage' => $project->secondsPerImage()->isNotEmpty() ? (int) $project->secondsPerImage()->value() : 8,
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),

View file

@ -0,0 +1,21 @@
<?php
$bodyBlocks = [];
foreach ($page->body()->toBlocks() as $block) {
if ($block->type() === 'text') {
$bodyBlocks[] = [
'type' => 'text',
'html' => $block->content()->text()->value(),
];
}
}
$specificData = [
'backgroundImage' => $page->backgroundImage()->toFile()?->url(),
'body' => $bodyBlocks,
];
$pageData = array_merge($genericData, $specificData);
header('Content-Type: application/json');
echo json_encode($pageData);

View file

@ -0,0 +1,2 @@
<?php snippet('header') ?>
<?php snippet('footer') ?>