2023-11-12 22:43:42 +01:00
|
|
|
---
|
2023-12-23 15:36:22 +01:00
|
|
|
import wg from "../../images/WarGears.png";
|
|
|
|
import mwg from "../../images/MiniWarGears.png";
|
|
|
|
import as from "../../images/AirShips.png";
|
|
|
|
import ws from "../../images/WarShips.png";
|
2023-11-12 22:43:42 +01:00
|
|
|
import {t} from "astro-i18n";
|
|
|
|
import {getCollection} from "astro:content";
|
2023-11-28 12:00:06 +01:00
|
|
|
import PageLayout from "../../layouts/PageLayout.astro";
|
2023-11-18 16:52:54 +01:00
|
|
|
import {Image} from "astro:assets";
|
2023-12-03 19:31:29 +01:00
|
|
|
import {l} from "../../util/util";
|
2023-11-12 22:43:42 +01:00
|
|
|
|
|
|
|
const imageMap = {
|
|
|
|
"wg": wg,
|
|
|
|
"mwg": mwg,
|
|
|
|
"as": as,
|
2023-12-05 17:36:31 +01:00
|
|
|
"ws": ws,
|
2024-02-11 11:16:23 +01:00
|
|
|
"qg": mwg,
|
2023-12-23 15:36:22 +01:00
|
|
|
};
|
2023-11-12 22:43:42 +01:00
|
|
|
|
2023-12-23 15:36:22 +01:00
|
|
|
const modes = await getCollection("modes", entry => entry.data.main);
|
2023-11-12 22:43:42 +01:00
|
|
|
---
|
|
|
|
|
2023-11-18 16:52:54 +01:00
|
|
|
<PageLayout title={t("page")}>
|
2023-11-12 22:43:42 +01:00
|
|
|
{modes.map(value => (
|
2023-12-23 15:36:22 +01:00
|
|
|
<div class="dark:bg-neutral-800 rounded-md p-4 border border-neutral-400 shadow-md my-4 flex flex-col
|
2023-11-12 22:43:42 +01:00
|
|
|
md:flex-row">
|
2024-02-11 11:16:23 +01:00
|
|
|
<Image height="300" width="300" src={imageMap[value.data.translationKey]}
|
|
|
|
alt={t(value.data.translationKey + ".title")} class="dark:invert"></Image>
|
2023-12-23 15:36:22 +01:00
|
|
|
<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={l(`/rules/${value.id}`)} class="text-yellow-300 hover:underline w-fit">{t("rules")}</a>
|
2024-02-11 11:16:23 +01:00
|
|
|
<a href={l(`/announcements/tags/${value.id}`)}
|
|
|
|
class="text-yellow-300 hover:underline w-fit">{t("announcements")}</a>
|
|
|
|
{value.data.ranked
|
|
|
|
? <a href={l(`/ranked/${value.id}`)}
|
|
|
|
class="text-yellow-300 hover:underline w-fit">{t("ranking")}</a>
|
|
|
|
: null}
|
2023-11-12 22:43:42 +01:00
|
|
|
</div>
|
2023-12-23 15:36:22 +01:00
|
|
|
</div>
|
|
|
|
</div>))}
|
2023-11-12 22:43:42 +01:00
|
|
|
</PageLayout>
|