Updates and more
This commit is contained in:
@ -4,6 +4,7 @@ import NavbarLayout from "../layouts/NavbarLayout.astro";
|
||||
import {astroI18n, createGetStaticPaths} from "astro-i18n";
|
||||
import localBau from "../images/2023-10-08_20.43.43.png";
|
||||
import {Image} from "astro:assets";
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
|
||||
export const getStaticPaths = createGetStaticPaths(async () => {
|
||||
let posts = await getCollection("pages");
|
||||
@ -18,22 +19,15 @@ const { Content } = await page.render();
|
||||
---
|
||||
|
||||
|
||||
<NavbarLayout title={page.data.title}>
|
||||
<div>
|
||||
<Image src={localBau} alt="Bau" width="1920" height="1080" class="w-screen h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false" />
|
||||
<article>
|
||||
<h1 class="text-left">{page.data.title}</h1>
|
||||
<Content />
|
||||
</article>
|
||||
</div>
|
||||
</NavbarLayout>
|
||||
<PageLayout title={page.data.title}>
|
||||
<article>
|
||||
<h1 class="text-left">{page.data.title}</h1>
|
||||
<Content />
|
||||
</article>
|
||||
</PageLayout>
|
||||
|
||||
<style is:global>
|
||||
article {
|
||||
width: min(100vw, 75em);
|
||||
@apply mx-auto bg-gray-100 p-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14
|
||||
dark:text-white dark:bg-neutral-900;
|
||||
|
||||
p {
|
||||
@apply my-4 leading-7;
|
||||
}
|
||||
|
||||
@ -1,24 +1,17 @@
|
||||
---
|
||||
|
||||
import NavbarLayout from "../layouts/NavbarLayout.astro";
|
||||
import localBau from "../images/2023-10-08_20.43.43.png";
|
||||
import { Image } from "astro:assets";
|
||||
import Dashboard from "../components/Dashboard.svelte";
|
||||
import {AES} from "crypto-js";
|
||||
import {l} from "../util/util";
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
---
|
||||
|
||||
<NavbarLayout title="Dashboard">
|
||||
<div>
|
||||
<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="mx-auto bg-gray-100 p-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14
|
||||
dark:text-white dark:bg-neutral-900" style="width: min(100vw, 75em)">
|
||||
<script>
|
||||
import {AES} from "crypto-js";
|
||||
import {l} from "../util/util";
|
||||
if (AES.decrypt(localStorage.getItem("sw-session") ?? "", import.meta.env.PUBLIC_SECRET)?.toString() === "") {
|
||||
window.location.href = l("/login");
|
||||
}
|
||||
</script>
|
||||
<Dashboard client:only="svelte" />
|
||||
</div>
|
||||
</div>
|
||||
</NavbarLayout>
|
||||
<PageLayout title="Dashboard">
|
||||
<script>
|
||||
import {AES} from "crypto-js";
|
||||
import {l} from "../util/util";
|
||||
if (AES.decrypt(localStorage.getItem("sw-session") ?? "", import.meta.env.PUBLIC_SECRET)?.toString() === "") {
|
||||
window.location.href = l("/login");
|
||||
}
|
||||
</script>
|
||||
<Dashboard client:only="svelte" />
|
||||
</PageLayout>
|
||||
@ -1,9 +1,7 @@
|
||||
---
|
||||
import NavbarLayout from "../layouts/NavbarLayout.astro";
|
||||
import localBau from "../images/2023-10-08_20.43.43.png";
|
||||
import {Image} from "astro:assets";
|
||||
import {l} from "../util/util";
|
||||
import Login from "../components/Login.svelte";
|
||||
import NavbarLayout from "../layouts/NavbarLayout.astro";
|
||||
---
|
||||
|
||||
<NavbarLayout title="Login">
|
||||
@ -15,9 +13,5 @@ import Login from "../components/Login.svelte";
|
||||
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
|
||||
dark:text-white " style="width: min(100vw, 75em);">
|
||||
<Login client:load />
|
||||
</div>
|
||||
<Login client:load />
|
||||
</NavbarLayout>
|
||||
36
src/pages/rules.astro
Normal file
36
src/pages/rules.astro
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
import wg from "../images/WarGears.png"
|
||||
import mwg from "../images/MiniWarGears.png"
|
||||
import as from "../images/AirShips.png"
|
||||
import ws from "../images/WarShips.png"
|
||||
import {t} from "astro-i18n";
|
||||
import {getCollection} from "astro:content";
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
|
||||
const imageMap = {
|
||||
"wg": wg,
|
||||
"mwg": mwg,
|
||||
"as": as,
|
||||
"ws": ws
|
||||
}
|
||||
|
||||
const modes = await getCollection("modes", entry => entry.data.main)
|
||||
---
|
||||
|
||||
<PageLayout title="Rules">
|
||||
{modes.map(value => (
|
||||
<div class="dark:bg-neutral-800 rounded-md p-4 border border-neutral-400 shadow-md my-4 flex flex-col
|
||||
md:flex-row">
|
||||
<Image height="300" width="300" src={imageMap[value.data.translationKey]} alt={t(value.data.translationKey + ".title")} class="dark:invert"></Image>
|
||||
<div class="ml-4">
|
||||
<h1 class="text-2xl font-bold">{t(value.data.translationKey + ".title")}</h1>
|
||||
<div>{t(value.data.translationKey + ".description")}</div>
|
||||
<div class="mt-2 flex flex-col">
|
||||
<a href="/" class="text-yellow-300 hover:underline w-fit">{t("rules")}</a>
|
||||
<a href="/" class="text-yellow-300 hover:underline w-fit">{t("council")}</a>
|
||||
{value.data.ranked ? <a href="/" class="text-yellow-300 hover:underline w-fit">{t("ranking")}</a> : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>))}
|
||||
</PageLayout>
|
||||
Reference in New Issue
Block a user