world-game/site/snippets/blocks/jeu.php
isUnknown 5b9b190b35 feat(jeu): bloc Kirby iframe + logique click-to-play dans Article.svelte
- site/blueprints/blocks/jeu.yml : champ URL pour l'iframe
- site/snippets/blocks/jeu.php : rendu HTML statique (container + overlay + bouton désactivation)
- Article.svelte : $effect pour attacher les handlers clic sur .iframe-game-container
  et onMount pour écouter postMessage GameReleaseFocus depuis impact.games

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 11:57:21 +01:00

19 lines
593 B
PHP

<?php if ($block->url()->isNotEmpty()): ?>
<div class="iframe-game-container">
<iframe
loading="eager"
importance="high"
width="400"
height="650"
style="float: right; border: medium; overflow: hidden; margin: 10px; pointer-events: none;"
src="<?= $block->url()->html() ?>"
></iframe>
<div class="iframe-click-overlay">
<div class="overlay-content">
<div class="play-icon">▶</div>
<p>Cliquez pour jouer</p>
</div>
</div>
<button class="iframe-deactivate-btn" title="Deactivate game (restore scrolling)">✕</button>
</div>
<?php endif ?>