-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathErrorPage.php
43 lines (37 loc) · 1.7 KB
/
ErrorPage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Peers\Components;
use Bottledcode\SwytchFramework\Hooks\Html\HeadTagFilter;
use Bottledcode\SwytchFramework\Template\Attributes\Component;
use Bottledcode\SwytchFramework\Template\Traits\RegularPHP;
#[Component('ErrorPage')]
class ErrorPage
{
use RegularPHP;
public function __construct(private readonly HeadTagFilter $headTagFilter)
{
}
public function render()
{
$this->headTagFilter->setTitle(__('Page not found'));
$this->begin();
?>
<body class="h-full bg-stone-50 dark:bg-stone-800 text-stone-900 dark:text-stone-50">
<main class="grid min-h-full place-items-center px-6 py-24 sm:py-32 lg:px-8">
<div class="text-center">
<p class="text-base font-semibold text-indigo-600 dark:text-indigo-300"><?= __('404') ?></p>
<h1 class="mt-4 text-3xl font-bold tracking-tight dark:text-stone-50 sm:text-5xl"><?= __('Page not found') ?></h1>
<p class="mt-6 text-base leading-7 text-stone-600 dark:text-stone-100">
<?= __("Sorry, we couldn’t find the page you’re looking for.") ?></p>
<div class="mt-10 flex items-center justify-center gap-x-6">
<a href="/"
class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
<?= __('Go back home') ?>
</a>
</div>
</div>
</main>
</body>
<?php
return $this->end();
}
}