This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/themes/rule34v2/upload.theme.php
2021-12-14 19:10:21 +00:00

32 lines
933 B
PHP

<?php
use MicroHTML\HTMLElement;
use function MicroHTML\A;
class CustomUploadTheme extends UploadTheme
{
public function display_block(Page $page): void
{
$page->add_block(new Block("Upload", $this->build_upload_block(), "head", 20));
$page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
}
public function display_full(Page $page): void
{
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "head", 20));
}
public function display_page(Page $page): void
{
parent::display_page($page);
$html = "
<a href='//rule34.paheal.net/wiki/tagging'>Tagging Guide</a>
";
$page->add_block(new Block(null, $html, "main", 19));
}
protected function build_upload_block(): HTMLElement
{
return A(["href"=>make_link("upload"), "style"=>'font-size: 2em; display: block;'], "Upload");
}
}