Feat: page Jouer renommée Play + vue implémentée
Renommage jouer → play (blueprint, template, txt, vue)
API play.json.php : title, lettering, description, thumbnail,
background_image, play_links par jeu enfant listed()
Vue Play.svelte :
- Fond image avec crossfade (transition opacity sur .play-bg)
- Section principale (.play-featured) : glissé/fondu au changement de jeu
via --slide-dir CSS var + classes is-out
- Carrousel nav (ul > li > button) : thumbnail + titre, active bordure verte
- Jeu sans play_links → bouton "Coming soon" désactivé
- Layout golden-grid, mobile adapté
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 17:58:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$specificData = [
|
|
|
|
|
'games' => $page->children()->listed()->map(function($game) {
|
|
|
|
|
return [
|
|
|
|
|
'title' => $game->title()->value(),
|
|
|
|
|
'slug' => $game->slug(),
|
|
|
|
|
'lettering' => $game->lettering()->toFile()?->url(),
|
|
|
|
|
'description' => $game->description()->value(),
|
|
|
|
|
'thumbnail' => $game->thumbnail()->toFile()?->url(),
|
2026-03-09 13:40:33 +01:00
|
|
|
'backgroundImage' => $game->backgroundImage()->toFile()?->url(),
|
|
|
|
|
'playLinks' => $game->playLinks()->toStructure()->map(fn($l) => [
|
Feat: page Jouer renommée Play + vue implémentée
Renommage jouer → play (blueprint, template, txt, vue)
API play.json.php : title, lettering, description, thumbnail,
background_image, play_links par jeu enfant listed()
Vue Play.svelte :
- Fond image avec crossfade (transition opacity sur .play-bg)
- Section principale (.play-featured) : glissé/fondu au changement de jeu
via --slide-dir CSS var + classes is-out
- Carrousel nav (ul > li > button) : thumbnail + titre, active bordure verte
- Jeu sans play_links → bouton "Coming soon" désactivé
- Layout golden-grid, mobile adapté
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 17:58:29 +01:00
|
|
|
'label' => $l->label()->value(),
|
|
|
|
|
'url' => $l->url()->value(),
|
|
|
|
|
])->values(),
|
|
|
|
|
];
|
|
|
|
|
})->values()
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$pageData = array_merge($genericData, $specificData);
|
|
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($pageData);
|