feat: add home and team editor templates

This commit is contained in:
Keith Solomon
2026-07-06 21:30:17 -05:00
parent c2233c1639
commit 7e6240733b
2 changed files with 106 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
use BattleForge\Http\Escape;
/** @var string $csrf Provided by the front controller. */
?><?php
render_layout(static function () use ($csrf): void {
$e = static fn (string $v): string => Escape::html($v);
$a = static fn (string $v): string => Escape::attr($v);
?>
<h1>BattleForge</h1>
<p><a href="<?= $a('/scenarios/new/edit/team') ?>">New scenario</a></p>
<h2>Recent scenarios</h2>
<div id="recent"><p class="bf-empty">No saved scenarios yet.</p></div>
<script type="module" src="<?= $a('/js/storage.js') ?>"></script>
<?php
}, $csrf, 'BattleForge');