All checks were successful
Deploy / Deploy to Production (push) Successful in 5m22s
- Renommage dossier content 3_play → 3_jouer (slug /jouer) - Champ backgroundColor (code-editor) dans game.yml + exposé en API - playLinks simplifié en champ url simple → playLink dans l'API - Variable CSS --background-color sur la section .play - Bouton "Jouer" avec icône play-icon (SVG data URI dans buttons.css) - Plugin sylvainjule/code-editor ajouté via composer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
749 B
PHP
21 lines
749 B
PHP
<?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(),
|
|
'backgroundImage' => $game->backgroundImage()->toFile()?->url(),
|
|
'backgroundColor' => $game->backgroundColor()->value() ?: null,
|
|
'playLink' => $game->playLinks()->value() ?: null,
|
|
];
|
|
})->values()
|
|
];
|
|
|
|
$pageData = array_merge($genericData, $specificData);
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($pageData);
|