This commit is contained in:
2024-01-06 15:08:54 +01:00
parent efd674eae1
commit 9ee0fd5448
28 changed files with 1162 additions and 800 deletions

View File

@ -70,7 +70,9 @@ const ogImage = await getImage({
<article>
<div class={"relative w-full " + (post.data.image ? "aspect-video" : "")}>
{post.data.image && (
<Image src={post.data.image} width="1920" height="1080" alt="" class="absolute top-0 left-0 w-full rounded-2xl linear-fade" />
<div class="absolute top-0 left-0 w-full aspect-video flex justify-center">
<Image src={post.data.image} height="1080" alt="" class="rounded-2xl linear-fade object-contain h-full" />
</div>
)}
<div class={post.data.image ? "absolute bottom-8 left-2" : "mb-4"}>
<h1 class="text-4xl mb-0">{post.data.title}</h1>

View File

@ -5,10 +5,12 @@ import {t} from "astro-i18n";
---
<PageLayout title={t("dashboard.page")}>
<script is:inline>
<script>
import {l} from "../util/util";
if ((localStorage.getItem("sw-session") ?? "") === "") {
window.location.href = l("/login");
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
if ((localStorage.getItem("sw-session") ?? "") === "") {
window.location.href = l("/login");
}
}
</script>
<Dashboard client:only="svelte" />

View File

@ -7,15 +7,16 @@ import localBau from "@images/2023-10-08_20.43.43.png";
---
<NavbarLayout title={t("login.page")}>
<script is:inline>
<script>
import {l} from "../util/util";
if ((localStorage.getItem("sw-session") ?? "") !== "") {
window.location.href = l("/dashboard");
if (window.location.href.endsWith("/login") || window.location.href.endsWith("/login/")) {
if ((localStorage.getItem("sw-session") ?? "") !== "") {
window.location.href = l("/dashboard");
}
}
</script>
<Image src={localBau} alt="Bau" width="1920" height="1080" class="w-screen h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false" />
<div class="h-screen mx-auto p-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14 flex flex-col justify-center items-center
<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>