footer_html as HTMLElement
This commit is contained in:
parent
4076051456
commit
d1ed1c4b64
2 changed files with 14 additions and 15 deletions
|
@ -6,7 +6,7 @@ namespace Shimmie2;
|
||||||
|
|
||||||
use MicroHTML\HTMLElement;
|
use MicroHTML\HTMLElement;
|
||||||
|
|
||||||
use function MicroHTML\{emptyHTML,rawHTML,HTML,HEAD,BODY,TITLE, LINK, SCRIPT, B};
|
use function MicroHTML\{emptyHTML, rawHTML, HTML, HEAD, BODY, TITLE, LINK, SCRIPT, A, B, joinHTML, BR};
|
||||||
|
|
||||||
require_once "core/event.php";
|
require_once "core/event.php";
|
||||||
|
|
||||||
|
@ -650,22 +650,21 @@ class BasePage
|
||||||
return emptyHTML();
|
return emptyHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function footer_html(): string
|
protected function footer_html(): HTMLElement
|
||||||
{
|
{
|
||||||
$debug = get_debug_info();
|
$debug = get_debug_info();
|
||||||
$contact_link = contact_link();
|
$contact_link = contact_link();
|
||||||
$contact = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a>";
|
return joinHTML("", [
|
||||||
|
"Media © their respective owners, ",
|
||||||
return "
|
A(["href" => "https://code.shishnet.org/shimmie2/"], "Shimmie"),
|
||||||
Media © their respective owners,
|
" © ",
|
||||||
<a href=\"https://code.shishnet.org/shimmie2/\">Shimmie</a> ©
|
A(["href" => "https://www.shishnet.org/"], "Shish"),
|
||||||
<a href=\"https://www.shishnet.org/\">Shish</a> &
|
" & ",
|
||||||
<a href=\"https://github.com/shish/shimmie2/graphs/contributors\">The Team</a>
|
A(["href" => "https://github.com/shish/shimmie2/graphs/contributors"], "The Team"),
|
||||||
2007-2024,
|
" 2007-2024, based on the Danbooru concept.",
|
||||||
based on the Danbooru concept.
|
BR(), $debug,
|
||||||
$debug
|
$contact_link ? emptyHTML(BR(), A(["href" => $contact_link], "Contact")) : ""
|
||||||
$contact
|
]);
|
||||||
";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -524,7 +524,7 @@ function get_debug_info(): string
|
||||||
{
|
{
|
||||||
$d = get_debug_info_arr();
|
$d = get_debug_info_arr();
|
||||||
|
|
||||||
$debug = "<br>Took {$d['time']} seconds (db:{$d['dbtime']}) and {$d['mem_mb']}MB of RAM";
|
$debug = "Took {$d['time']} seconds (db:{$d['dbtime']}) and {$d['mem_mb']}MB of RAM";
|
||||||
$debug .= "; Used {$d['files']} files and {$d['query_count']} queries";
|
$debug .= "; Used {$d['files']} files and {$d['query_count']} queries";
|
||||||
$debug .= "; Sent {$d['event_count']} events";
|
$debug .= "; Sent {$d['event_count']} events";
|
||||||
$debug .= "; {$d['cache_hits']} cache hits and {$d['cache_misses']} misses";
|
$debug .= "; {$d['cache_hits']} cache hits and {$d['cache_misses']} misses";
|
||||||
|
|
Reference in a new issue