f84bcaec01
I wanted to ensure that all pages (even the downtime page, terms page, home page, etc) had the appropriate `data-` attributes on `<body>` (because those are required for certain javascript, eg autocomplete, to work). One thing led to another and now everything in `head` is microhtml'ed
25 lines
628 B
PHP
25 lines
628 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shimmie2;
|
|
|
|
use function MicroHTML\{emptyHTML, TITLE, META, rawHTML};
|
|
|
|
class TermsTheme extends Themelet
|
|
{
|
|
public function display_page(Page $page, string $sitename, string $path, string $body): void
|
|
{
|
|
$html =
|
|
"<div id='terms-modal-bg'>
|
|
<dialog id='terms-modal' class='setupblock' open>
|
|
<h1><span>$sitename</span></h1>
|
|
$body
|
|
<form action='/accept_terms/$path' method='POST'>
|
|
<button class='terms-modal-enter' autofocus>Enter</button>
|
|
</form>
|
|
</dialog>
|
|
</div>";
|
|
$page->add_block(new Block(null, $html, "main", 1));
|
|
}
|
|
}
|