add footer (#13)
All checks were successful
delpoy / build-and-deploy (push) Successful in 50s

This commit is contained in:
bytedream 2023-11-30 21:56:08 +01:00
parent f6f9fafc64
commit dd19ff8c15
2 changed files with 19 additions and 1 deletions

View File

@ -73,7 +73,7 @@
/>
<main>
<div class="min-h-screen h-screen w-full">
<div class="min-h-screen h-full w-full">
<slot />
</div>
</main>
@ -156,3 +156,19 @@
</div>
</div>
</nav>
{#if !onAdminPage && $page.url.pathname !== `${env.PUBLIC_BASE_PATH}/register`}
<footer>
<div
class="flex justify-around items-center h-14 w-full bg-base-300"
class:hidden={onAdminPage}
>
<div>
<p>© {new Date().getFullYear()} MHSL Craftattack Team</p>
</div>
<div class="flex gap-4">
<a class="link" href="https://mhsl.eu/id.html" target="_blank">Impressum</a>
<a class="link" href="https://mhsl.eu/datenschutz.html" target="_blank">Datenschutz</a>
</div>
</div>
</footer>
{/if}

View File

@ -3,6 +3,8 @@ import { error, type RequestHandler } from '@sveltejs/kit';
import { Settings, User } from '$lib/server/database';
export const POST = (async ({ request }) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
if ((await Settings.findOne({ where: { key: 'register.enabled' } }))?.value === false) {
throw error(400, 'Anmeldung geschlossen');
}