--- import dayjs from "dayjs"; import NavbarLayout from "@layouts/NavbarLayout.astro"; import { getCollection } from "astro:content"; import { astroI18n } from "astro-i18n"; import { Image } from "astro:assets"; import Card from "@components/Card.svelte"; import { CaretRight, Pause, Rocket, Crosshair1 } from "@astropub/icons"; import { t } from "astro-i18n"; import { l } from "@utils/util"; import PlayerCount from "@components/PlayerCount.svelte"; import "../../public/fonts/barlow-condensed/barlow-condensed.css"; import { type Player } from "../components/types/data"; import PostComponent from "../components/PostComponent.astro"; import BackgroundImage from "../components/BackgroundImage.astro"; const teamMember: { [key: string]: Player[] } = await fetch(import.meta.env.PUBLIC_API_SERVER + "/data/team").then((value) => value.json()); const posts = await getCollection("announcements", (entry) => entry.id.split("/")[0] === astroI18n.locale); const germanPosts = await getCollection("announcements", (entry) => entry.id.split("/")[0] === astroI18n.fallbackLocale); germanPosts.forEach((value) => { if (posts.find((post) => post.data.key === value.data.key)) { return; } else { posts.push(value); } }); const latestPost = posts.sort((a, b) => dayjs(b.data.created).unix() - dayjs(a.data.created).unix()).at(0); const prefixColorMap: { [key: string]: string; } = { Admin: "border-red-600 dark:border-red-800 shadow-red-600 dark:shadow-red-800", Dev: "border-sky-600 dark:border-sky-800 shadow-sky-600 dark:shadow-sky-800", Mod: "border-amber-600 dark:border-amber-800 shadow-amber-600 dark:shadow-amber-800", Sup: "border-blue-700 dark:border-blue-900 shadow-blue-700 dark:shadow-blue-900", Arch: "border-green-500 dark:border-green-700 shadow-green-500 dark:shadow-green-700", }; ---

{t("home.title.first")}{t("home.title.second")}

{t("home.subtitle.1")}

{t("home.subtitle.2")}

{t("home.subtitle.3")}

{t("home.join")}

{t("home.benefits.fights.title")}

{t("home.benefits.fights.description.1")}

{t("home.benefits.fights.description.2")}

{t("home.benefits.bau.title")}

{t("home.benefits.bau.description")}

{t("home.benefits.minigames.title")}

{t("home.benefits.minigames.description.1")}

{t("home.benefits.minigames.description.2")}

{ Object.entries(teamMember).map(([prefix, players]) => ( {players.map((v, index) => (
{index == 0 ?

{t("home.prefix." + prefix)}

: null}
{v.name}
{v.name
))}
)) }