20 lines
622 B
PHP
20 lines
622 B
PHP
<?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');
|