Refactor: snake_case → camelCase dans blueprints, templates et vues

- Blueprints : renommage des champs (member_name, related_articles,
  background_video, play_links, images_gallery, external_links) et
  des noms de sections
- Templates JSON PHP : clés de sortie et appels ->method() en camelCase
- Vues Svelte (Play, Portfolio) : accès aux données alignés

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-09 13:40:33 +01:00
parent d8a0fde34c
commit 69859cc60f
19 changed files with 63 additions and 76 deletions

View file

@ -1,26 +1,26 @@
<?php
$specificData = [
'background_image' => $page->backgroundImage()->toFile()?->url(),
'backgroundImage' => $page->backgroundImage()->toFile()?->url(),
'projects' => $page->children()->listed()->map(function($project) {
return [
'title' => $project->title()->value(),
'slug' => $project->slug(),
'catchphrase' => $project->catchphrase()->value(),
'catchPhrase' => $project->catchPhrase()->value(),
'description' => $project->description()->value(),
'thumbnail' => $project->thumbnail()->toFile()?->url(),
'images_gallery' => $project->images_gallery()->toFiles()->map(fn($f) => [
'imagesGallery' => $project->imagesGallery()->toFiles()->map(fn($f) => [
'src' => $f->url(),
'srcset' => $f->srcset('gallery'),
'webp' => $f->srcset('gallery-webp'),
])->values(),
'mockup' => $project->mockup()->toFile()?->url(),
'gallery_background_color' => $project->galleryBackgroundColor()->value(),
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),
'keywords' => $project->keywords()->toStructure()->map(fn($i) => [
'label' => $i->label()->value(),
'text' => $i->text()->value(),
])->values(),
'external_links' => $project->external_links()->toStructure()->map(fn($i) => [
'externalLinks' => $project->externalLinks()->toStructure()->map(fn($i) => [
'label' => $i->label()->value(),
'url' => $i->url()->value(),
])->values(),