Migration vers architecture Svelte + Kirby inspirée de design-to-pack

- Mise en place de Svelte 4 avec Vite pour le frontend (SPA)
- Simplification des templates PHP (header/footer minimalistes)
- Création de templates JSON pour API (home, about, expertise, portfolio, jouer, game, blog, article, project)
- Ajout d'un controller de site pour définir genericData globalement
- Structure des stores Svelte (page, navigation, locale, site)
- Router avec navaid pour navigation SPA et interception des liens
- Composants layout (Header, Footer, Cursor) et vues de base
- Build Vite vers assets/dist/ (index.js/css)
- Header PHP détecte assets/dist pour basculer dev/prod

Architecture fonctionnelle de base établie, à améliorer et compléter.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-06 16:30:15 +01:00
parent c4456d587c
commit cbe89acb21
53 changed files with 3348 additions and 772 deletions

View file

@ -1,61 +1,2 @@
<?php snippet('header') ?>
<main class="blog">
<!-- Intro Section -->
<section class="blog__intro">
<h1 class="blog__title"><?= $page->intro_title() ?></h1>
<?php if ($page->intro_text()->isNotEmpty()): ?>
<p class="blog__subtitle"><?= $page->intro_text() ?></p>
<?php endif ?>
</section>
<!-- Articles List -->
<section class="blog__articles">
<?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $article): ?>
<article class="article-card">
<!-- Date -->
<?php if ($article->date()->isNotEmpty()): ?>
<time class="article-card__date" datetime="<?= $article->date()->toDate('Y-m-d') ?>">
<?= $article->date()->toDate('d/m/Y') ?>
</time>
<?php endif ?>
<!-- Content -->
<div class="article-card__content">
<h2 class="article-card__title">
<a href="<?= $article->url() ?>"><?= $article->title() ?></a>
</h2>
<?php if ($article->intro()->isNotEmpty()): ?>
<p class="article-card__intro"><?= $article->intro()->excerpt(200) ?></p>
<?php endif ?>
<a href="<?= $article->url() ?>" class="article-card__link">
Lire la suite &rarr;
</a>
</div>
<!-- Author -->
<div class="article-card__author">
<?php if ($photo = $article->author_photo()->toFile()): ?>
<img src="<?= $photo->url() ?>" alt="<?= $article->author_name() ?>" class="article-card__author-photo">
<?php endif ?>
<?php if ($article->author_name()->isNotEmpty()): ?>
<span class="article-card__author-name"><?= $article->author_name() ?></span>
<?php endif ?>
</div>
<!-- Cover Image -->
<?php if ($cover = $article->cover()->toFile()): ?>
<div class="article-card__cover">
<img src="<?= $cover->url() ?>" alt="<?= $article->title() ?>">
</div>
<?php endif ?>
</article>
<?php endforeach ?>
</section>
</main>
<?php snippet('footer') ?>