30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
---
|
|
import Login from "@components/Login.svelte";
|
|
import NavbarLayout from "@layouts/NavbarLayout.astro";
|
|
import {t} from "astro-i18n";
|
|
import {Image} from "astro:assets";
|
|
import localBau from "@images/2023-10-08_20.43.43.png";
|
|
import BackgroundImage from "../components/BackgroundImage.astro";
|
|
---
|
|
|
|
<NavbarLayout title={t("login.page")}>
|
|
<script>
|
|
import {l} from "../util/util";
|
|
import {navigate} from "astro:transitions/client";
|
|
|
|
document.addEventListener("astro:page-load", () => {
|
|
if (window.location.href.endsWith("/login") || window.location.href.endsWith("/login/")) {
|
|
if ((localStorage.getItem("sw-session") ?? "") !== "") {
|
|
navigate(l("/dashboard"), {history: "replace"});
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
<div class="h-screen w-screen fixed -z-10">
|
|
<BackgroundImage />
|
|
</div>
|
|
<div class="h-screen mx-auto p-8 rounded-b-md pt-40 sm:pt-28 md:pt-14 flex flex-col justify-center items-center
|
|
dark:text-white " style="width: min(100vw, 75em);">
|
|
<Login client:load/>
|
|
</div>
|
|
</NavbarLayout> |