forbidden.templ

 1package pages
 2
 3templ Forbidden() {
 4	@Layout() {
 5		<div class="flex flex-col items-center justify-center h-screen px-2">
 6			<img src={ hashStatic("/static/401.jpg") } alt="403 Forbidden" class="h-[250px] md:h-[500px] rounded-lg mb-2"/>
 7			<div class="text-4xl md:text-6xl text-(--color-black)"><span class="font-extrabold text-(--color-orange)">403</span> Forbidden</div>
 8			<p class="text-lg md:text-2xl text-gray-600">You probably need to <a id="login-link" class="underline decoration-dotted text-(--color-blue)" href="/login">log in</a>.</p>
 9		</div>
10		<script>
11			document.addEventListener('DOMContentLoaded', function() {
12				var params = new URLSearchParams(window.location.search);
13				var next = params.get('next');
14				if (next) {
15					var link = document.getElementById('login-link');
16					if (link) {
17						link.href = '/login?next=' + encodeURIComponent(next);
18					}
19				}
20			});
21		</script>
22	}
23}