--- 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 { 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 prefixColors: { [key: string]: string } = { Admin: "#dc2626", Dev: "#0284c7", Mod: "#d97706", Sup: "#1d4ed8", Arch: "#22c55e", }; const featClass = "flex flex-col items-center text-center py-10 px-8 border-b border-white/[0.04] md:border-b-0 md:border-r md:last:border-r-0 transition-[background] duration-[400ms] hover:bg-amber-500/[0.025] [&_svg]:text-amber-500 [&_svg]:mb-5 [&_svg]:transition-transform [&_svg]:duration-300 [&:hover_svg]:scale-[1.15]"; const featNum = "font-display text-[3.5rem] font-extrabold leading-none text-amber-500/10 mb-5"; const featH3 = "font-display text-[1.15rem] font-bold text-white tracking-[0.08em] uppercase mb-3"; const featP = "text-neutral-400/85 text-[0.85rem] leading-[1.65] mt-1"; ---

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

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

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

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

{t("home.join")}
01

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

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

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

02

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

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

03

{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, i) => (
{i === 0 && (

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

)}
{v.name} {v.name}
))}
)) }