@ -95,6 +95,7 @@ export const publics = defineCollection({
|
||||
"distance": z.number().optional(),
|
||||
}).optional(),
|
||||
"image": image(),
|
||||
"alt": image().optional(),
|
||||
"xray": image().optional(),
|
||||
"gamemode": reference("modes"),
|
||||
"3d": z.boolean().optional().default(true),
|
||||
|
9
src/content/publics/airship/bomber.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Bomber",
|
||||
"description": "A simple, lightweight description of a TheScythe.",
|
||||
"id": 456,
|
||||
"creator": ["Team aaZ"],
|
||||
"gamemode": "airship",
|
||||
"image": "../../../images/publics/bomber/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/airship/orion.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Orion",
|
||||
"description": "A simple, lightweight description of a TheScythe.",
|
||||
"id": 456,
|
||||
"creator": ["Team aaZ"],
|
||||
"gamemode": "airship",
|
||||
"image": "../../../images/publics/orion/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/airship/starcruiser.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "StarCruiser",
|
||||
"description": "A simple, lightweight description of a TheScythe.",
|
||||
"id": 456,
|
||||
"creator": ["Team aaZ"],
|
||||
"gamemode": "airship",
|
||||
"image": "../../../images/publics/starcruiser/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/airship/thecountess.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "The Countess",
|
||||
"description": "A simple, lightweight description of a TheScythe.",
|
||||
"id": 456,
|
||||
"creator": ["Team aaZ"],
|
||||
"gamemode": "airship",
|
||||
"image": "../../../images/publics/thecountess/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/airship/thescythe.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "TheScythe",
|
||||
"description": "A simple, lightweight description of a TheScythe.",
|
||||
"id": 456,
|
||||
"creator": ["Team aaZ"],
|
||||
"gamemode": "airship",
|
||||
"image": "../../../images/publics/thescythe/area_render_3_.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/blackknight.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Black Knight",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/blackknight/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/harvester.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Harvester",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/harvester/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/inferno.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Inferno",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/inferno/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/isegrim.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Isegrim",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/isegrim/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/naturgestein.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Naturgestein",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/naturgestein/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/reaper.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "DPR PV1 Reaper",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/reaper/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/shadowmoses.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "ShadowMoses",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/shadowmoses/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/snowowl.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "SnowOwl",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/snowowl/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/miniwargear/theunderground.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "TheUnderground",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "miniwargear",
|
||||
"image": "../../../images/publics/underground/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/quickgear/haze.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Haze",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "quickgear",
|
||||
"image": "../../../images/publics/haze/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/quickgear/hornet.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Hornet",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "quickgear",
|
||||
"image": "../../../images/publics/hornet/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/quickgear/undeadlegion.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Undead Legion",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "quickgear",
|
||||
"image": "../../../images/publics/undeadlegion/area_render.png",
|
||||
"3d": false
|
||||
}
|
@ -4,6 +4,6 @@
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "wargear",
|
||||
"image": "../../images/publics/frostbite/area_render_2_.png",
|
||||
"xray": "../../images/publics/frostbite/area_render_1_.png"
|
||||
"image": "../../../images/publics/frostbite/area_render_2_.png",
|
||||
"xray": "../../../images/publics/frostbite/area_render_1_.png"
|
||||
}
|
@ -4,6 +4,6 @@
|
||||
"id": 789,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "wargear",
|
||||
"image": "../../images/publics/ghostleviathan/area_render_9_.png",
|
||||
"image": "../../../images/publics/ghostleviathan/area_render_9_.png",
|
||||
"3d": false
|
||||
}
|
@ -4,6 +4,6 @@
|
||||
"id": 456,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "wargear",
|
||||
"image": "../../images/publics/lilith/area_render_11_.png",
|
||||
"image": "../../../images/publics/lilith/area_render_11_.png",
|
||||
"3d": false
|
||||
}
|
@ -4,6 +4,6 @@
|
||||
"id": 456,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "wargear",
|
||||
"image": "../../images/publics/warpedowl/area_render_12_.png",
|
||||
"image": "../../../images/publics/warpedowl/area_render_12_.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/grafspree.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Graf Spree",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/grafspree/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/helgoland.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "SMS Helgoland",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/helgoland/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/oklahoma.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "USS Oklahoma",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/oklahoma/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/princeofwales.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "HMS Prince of Wales",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/princeofwales/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/storming.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "SMS Storming",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/storming/area_render.png",
|
||||
"3d": false
|
||||
}
|
9
src/content/publics/warship/stormyhunter.json
Normale Datei
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Stormy Hunter",
|
||||
"description": "A simple, lightweight description of a frostbite.",
|
||||
"id": 123,
|
||||
"creator": ["Test", "Test2"],
|
||||
"gamemode": "warship",
|
||||
"image": "../../../images/publics/stormyhunter/area_render.png",
|
||||
"3d": false
|
||||
}
|
BIN
src/images/publics/blackknight/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.6 MiB |
BIN
src/images/publics/bomber/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1006 KiB |
BIN
src/images/publics/grafspree/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1.3 MiB |
BIN
src/images/publics/harvester/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.5 MiB |
BIN
src/images/publics/haze/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.5 MiB |
BIN
src/images/publics/helgoland/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1.5 MiB |
BIN
src/images/publics/hornet/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.0 MiB |
BIN
src/images/publics/inferno/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.6 MiB |
BIN
src/images/publics/isegrim/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.7 MiB |
BIN
src/images/publics/naturgestein/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.7 MiB |
BIN
src/images/publics/oklahoma/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1.8 MiB |
BIN
src/images/publics/orion/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 743 KiB |
BIN
src/images/publics/princeofwales/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1.9 MiB |
BIN
src/images/publics/reaper/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.0 MiB |
BIN
src/images/publics/shadowmoses/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.7 MiB |
BIN
src/images/publics/snowowl/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.4 MiB |
BIN
src/images/publics/starcruiser/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 711 KiB |
BIN
src/images/publics/storming/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.6 MiB |
BIN
src/images/publics/stormyhunter/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.3 MiB |
BIN
src/images/publics/thecountess/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 1.1 MiB |
BIN
src/images/publics/thescythe/area_render_3_.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 738 KiB |
BIN
src/images/publics/undeadlegion/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 2.6 MiB |
BIN
src/images/publics/underground/area_render.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 3.6 MiB |
@ -24,7 +24,7 @@ const { schem }: { schem: CollectionEntry<"publics">} = Astro.props;
|
||||
<PageLayout title={schem.data.name}>
|
||||
<h1 class="text-5xl font-bold w-fit" transition:name={schem.data.id + "-title"}>{schem.data.name}</h1>
|
||||
<PublicPreview client:idle pub={schem} imageHeight={schem.data.image.height}>
|
||||
<Image class="object-contain" transition:name={schem.data.id + "-img"} src={schem.data.image} alt={schem.data.name}></Image>
|
||||
<Image class="object-contain" transition:name={schem.data.id + "-img"} src={schem.data.alt || schem.data.image} alt={schem.data.name}></Image>
|
||||
</PublicPreview>
|
||||
<p transition:name={schem.data.id + "-desc"}>{schem.data.description}</p>
|
||||
<p>
|
@ -8,15 +8,22 @@ import {getCollection} from "astro:content";
|
||||
import PageLayout from "../../layouts/PageLayout.astro";
|
||||
import {Image} from "astro:assets";
|
||||
import {l} from "../../util/util";
|
||||
import {ImageMetadata} from "astro";
|
||||
|
||||
const imageMap = {
|
||||
"wg": wg,
|
||||
"mwg": mwg,
|
||||
"as": as,
|
||||
"ws": ws,
|
||||
"qg": mwg,
|
||||
"wg": await getRandomFromMode("wargear"),
|
||||
"mwg": await getRandomFromMode("miniwargear"),
|
||||
"as": await getRandomFromMode("airship"),
|
||||
"ws": await getRandomFromMode("warship"),
|
||||
"qg": await getRandomFromMode("quickgear"),
|
||||
};
|
||||
|
||||
async function getRandomFromMode(mode: "wargear" | "airship" | "megawargear" | "microwargear" | "miniwargear" | "quickgear" | "streetfight" | "warship"): Promise<ImageMetadata> {
|
||||
const publics = await getCollection("publics", entry => entry.data.gamemode.id === mode);
|
||||
|
||||
return publics[Math.floor(Math.random() * publics.length)].data.image;
|
||||
}
|
||||
|
||||
const modes = await getCollection("modes", entry => entry.data.main);
|
||||
---
|
||||
|
||||
@ -25,7 +32,7 @@ const modes = await getCollection("modes", entry => entry.data.main);
|
||||
<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("rules." + value.data.translationKey + ".title")} class="dark:invert"></Image>
|
||||
alt={t("rules." + value.data.translationKey + ".title")}></Image>
|
||||
<div class="ml-4">
|
||||
<h1 class="text-2xl font-bold">{t(value.data.translationKey + ".title")}</h1>
|
||||
<div>{t("rules." + value.data.translationKey + ".description")}</div>
|
||||
|