diff --git a/src/content/config.ts b/src/content/config.ts index 048b28c..a82b375 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -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), diff --git a/src/content/publics/airship/bomber.json b/src/content/publics/airship/bomber.json new file mode 100644 index 0000000..80b1d36 --- /dev/null +++ b/src/content/publics/airship/bomber.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/airship/orion.json b/src/content/publics/airship/orion.json new file mode 100644 index 0000000..ba578a0 --- /dev/null +++ b/src/content/publics/airship/orion.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/airship/starcruiser.json b/src/content/publics/airship/starcruiser.json new file mode 100644 index 0000000..ae8354d --- /dev/null +++ b/src/content/publics/airship/starcruiser.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/airship/thecountess.json b/src/content/publics/airship/thecountess.json new file mode 100644 index 0000000..c3ee010 --- /dev/null +++ b/src/content/publics/airship/thecountess.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/airship/thescythe.json b/src/content/publics/airship/thescythe.json new file mode 100644 index 0000000..ea3fdff --- /dev/null +++ b/src/content/publics/airship/thescythe.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/blackknight.json b/src/content/publics/miniwargear/blackknight.json new file mode 100644 index 0000000..4aad7df --- /dev/null +++ b/src/content/publics/miniwargear/blackknight.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/harvester.json b/src/content/publics/miniwargear/harvester.json new file mode 100644 index 0000000..baa8107 --- /dev/null +++ b/src/content/publics/miniwargear/harvester.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/inferno.json b/src/content/publics/miniwargear/inferno.json new file mode 100644 index 0000000..53704c3 --- /dev/null +++ b/src/content/publics/miniwargear/inferno.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/isegrim.json b/src/content/publics/miniwargear/isegrim.json new file mode 100644 index 0000000..c43dc1b --- /dev/null +++ b/src/content/publics/miniwargear/isegrim.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/naturgestein.json b/src/content/publics/miniwargear/naturgestein.json new file mode 100644 index 0000000..68abc1c --- /dev/null +++ b/src/content/publics/miniwargear/naturgestein.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/reaper.json b/src/content/publics/miniwargear/reaper.json new file mode 100644 index 0000000..ac438dc --- /dev/null +++ b/src/content/publics/miniwargear/reaper.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/shadowmoses.json b/src/content/publics/miniwargear/shadowmoses.json new file mode 100644 index 0000000..46c767b --- /dev/null +++ b/src/content/publics/miniwargear/shadowmoses.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/snowowl.json b/src/content/publics/miniwargear/snowowl.json new file mode 100644 index 0000000..1001353 --- /dev/null +++ b/src/content/publics/miniwargear/snowowl.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/miniwargear/theunderground.json b/src/content/publics/miniwargear/theunderground.json new file mode 100644 index 0000000..d899ed1 --- /dev/null +++ b/src/content/publics/miniwargear/theunderground.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/quickgear/haze.json b/src/content/publics/quickgear/haze.json new file mode 100644 index 0000000..7c81220 --- /dev/null +++ b/src/content/publics/quickgear/haze.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/quickgear/hornet.json b/src/content/publics/quickgear/hornet.json new file mode 100644 index 0000000..a2dbfe7 --- /dev/null +++ b/src/content/publics/quickgear/hornet.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/quickgear/undeadlegion.json b/src/content/publics/quickgear/undeadlegion.json new file mode 100644 index 0000000..8e5d5c0 --- /dev/null +++ b/src/content/publics/quickgear/undeadlegion.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/frostbite.json b/src/content/publics/wargear/frostbite.json similarity index 55% rename from src/content/publics/frostbite.json rename to src/content/publics/wargear/frostbite.json index 9379724..960397d 100644 --- a/src/content/publics/frostbite.json +++ b/src/content/publics/wargear/frostbite.json @@ -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" } \ No newline at end of file diff --git a/src/content/publics/ghostleviathan.json b/src/content/publics/wargear/ghostleviathan.json similarity index 72% rename from src/content/publics/ghostleviathan.json rename to src/content/publics/wargear/ghostleviathan.json index 0765447..aedd234 100644 --- a/src/content/publics/ghostleviathan.json +++ b/src/content/publics/wargear/ghostleviathan.json @@ -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 } \ No newline at end of file diff --git a/src/content/publics/lilith.json b/src/content/publics/wargear/lilith.json similarity index 72% rename from src/content/publics/lilith.json rename to src/content/publics/wargear/lilith.json index 14110fb..21dd0c9 100644 --- a/src/content/publics/lilith.json +++ b/src/content/publics/wargear/lilith.json @@ -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 } \ No newline at end of file diff --git a/src/content/publics/warpedowl.json b/src/content/publics/wargear/warpedowl.json similarity index 72% rename from src/content/publics/warpedowl.json rename to src/content/publics/wargear/warpedowl.json index 465858e..828ff70 100644 --- a/src/content/publics/warpedowl.json +++ b/src/content/publics/wargear/warpedowl.json @@ -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 } \ No newline at end of file diff --git a/src/content/publics/warship/grafspree.json b/src/content/publics/warship/grafspree.json new file mode 100644 index 0000000..9b88a44 --- /dev/null +++ b/src/content/publics/warship/grafspree.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/warship/helgoland.json b/src/content/publics/warship/helgoland.json new file mode 100644 index 0000000..a01f971 --- /dev/null +++ b/src/content/publics/warship/helgoland.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/warship/oklahoma.json b/src/content/publics/warship/oklahoma.json new file mode 100644 index 0000000..3a4f74d --- /dev/null +++ b/src/content/publics/warship/oklahoma.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/warship/princeofwales.json b/src/content/publics/warship/princeofwales.json new file mode 100644 index 0000000..abd2f7e --- /dev/null +++ b/src/content/publics/warship/princeofwales.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/warship/storming.json b/src/content/publics/warship/storming.json new file mode 100644 index 0000000..09820e9 --- /dev/null +++ b/src/content/publics/warship/storming.json @@ -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 +} \ No newline at end of file diff --git a/src/content/publics/warship/stormyhunter.json b/src/content/publics/warship/stormyhunter.json new file mode 100644 index 0000000..0023078 --- /dev/null +++ b/src/content/publics/warship/stormyhunter.json @@ -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 +} \ No newline at end of file diff --git a/src/images/publics/blackknight/area_render.png b/src/images/publics/blackknight/area_render.png new file mode 100644 index 0000000..cd393aa Binary files /dev/null and b/src/images/publics/blackknight/area_render.png differ diff --git a/src/images/publics/bomber/area_render.png b/src/images/publics/bomber/area_render.png new file mode 100644 index 0000000..25f0879 Binary files /dev/null and b/src/images/publics/bomber/area_render.png differ diff --git a/src/images/publics/grafspree/area_render.png b/src/images/publics/grafspree/area_render.png new file mode 100644 index 0000000..ab9e9cc Binary files /dev/null and b/src/images/publics/grafspree/area_render.png differ diff --git a/src/images/publics/harvester/area_render.png b/src/images/publics/harvester/area_render.png new file mode 100644 index 0000000..2320730 Binary files /dev/null and b/src/images/publics/harvester/area_render.png differ diff --git a/src/images/publics/haze/area_render.png b/src/images/publics/haze/area_render.png new file mode 100644 index 0000000..5a4e499 Binary files /dev/null and b/src/images/publics/haze/area_render.png differ diff --git a/src/images/publics/helgoland/area_render.png b/src/images/publics/helgoland/area_render.png new file mode 100644 index 0000000..717aaa0 Binary files /dev/null and b/src/images/publics/helgoland/area_render.png differ diff --git a/src/images/publics/hornet/area_render.png b/src/images/publics/hornet/area_render.png new file mode 100644 index 0000000..4f1e0f8 Binary files /dev/null and b/src/images/publics/hornet/area_render.png differ diff --git a/src/images/publics/inferno/area_render.png b/src/images/publics/inferno/area_render.png new file mode 100644 index 0000000..684f553 Binary files /dev/null and b/src/images/publics/inferno/area_render.png differ diff --git a/src/images/publics/isegrim/area_render.png b/src/images/publics/isegrim/area_render.png new file mode 100644 index 0000000..a64e3e7 Binary files /dev/null and b/src/images/publics/isegrim/area_render.png differ diff --git a/src/images/publics/naturgestein/area_render.png b/src/images/publics/naturgestein/area_render.png new file mode 100644 index 0000000..d403ad9 Binary files /dev/null and b/src/images/publics/naturgestein/area_render.png differ diff --git a/src/images/publics/oklahoma/area_render.png b/src/images/publics/oklahoma/area_render.png new file mode 100644 index 0000000..339bc5f Binary files /dev/null and b/src/images/publics/oklahoma/area_render.png differ diff --git a/src/images/publics/orion/area_render.png b/src/images/publics/orion/area_render.png new file mode 100644 index 0000000..8229933 Binary files /dev/null and b/src/images/publics/orion/area_render.png differ diff --git a/src/images/publics/princeofwales/area_render.png b/src/images/publics/princeofwales/area_render.png new file mode 100644 index 0000000..c0449f6 Binary files /dev/null and b/src/images/publics/princeofwales/area_render.png differ diff --git a/src/images/publics/reaper/area_render.png b/src/images/publics/reaper/area_render.png new file mode 100644 index 0000000..c4d3f5b Binary files /dev/null and b/src/images/publics/reaper/area_render.png differ diff --git a/src/images/publics/shadowmoses/area_render.png b/src/images/publics/shadowmoses/area_render.png new file mode 100644 index 0000000..a5e319a Binary files /dev/null and b/src/images/publics/shadowmoses/area_render.png differ diff --git a/src/images/publics/snowowl/area_render.png b/src/images/publics/snowowl/area_render.png new file mode 100644 index 0000000..c0d1cce Binary files /dev/null and b/src/images/publics/snowowl/area_render.png differ diff --git a/src/images/publics/starcruiser/area_render.png b/src/images/publics/starcruiser/area_render.png new file mode 100644 index 0000000..5a2bcd7 Binary files /dev/null and b/src/images/publics/starcruiser/area_render.png differ diff --git a/src/images/publics/storming/area_render.png b/src/images/publics/storming/area_render.png new file mode 100644 index 0000000..b5c14ad Binary files /dev/null and b/src/images/publics/storming/area_render.png differ diff --git a/src/images/publics/stormyhunter/area_render.png b/src/images/publics/stormyhunter/area_render.png new file mode 100644 index 0000000..37c2ebe Binary files /dev/null and b/src/images/publics/stormyhunter/area_render.png differ diff --git a/src/images/publics/thecountess/area_render.png b/src/images/publics/thecountess/area_render.png new file mode 100644 index 0000000..a2aaf49 Binary files /dev/null and b/src/images/publics/thecountess/area_render.png differ diff --git a/src/images/publics/thescythe/area_render_3_.png b/src/images/publics/thescythe/area_render_3_.png new file mode 100644 index 0000000..883b2d7 Binary files /dev/null and b/src/images/publics/thescythe/area_render_3_.png differ diff --git a/src/images/publics/undeadlegion/area_render.png b/src/images/publics/undeadlegion/area_render.png new file mode 100644 index 0000000..b2ac1d8 Binary files /dev/null and b/src/images/publics/undeadlegion/area_render.png differ diff --git a/src/images/publics/underground/area_render.png b/src/images/publics/underground/area_render.png new file mode 100644 index 0000000..a8a78d6 Binary files /dev/null and b/src/images/publics/underground/area_render.png differ diff --git a/src/pages/publics/[schem].astro b/src/pages/publics/[...schem].astro similarity index 91% rename from src/pages/publics/[schem].astro rename to src/pages/publics/[...schem].astro index 4dbd979..700498a 100644 --- a/src/pages/publics/[schem].astro +++ b/src/pages/publics/[...schem].astro @@ -24,7 +24,7 @@ const { schem }: { schem: CollectionEntry<"publics">} = Astro.props;

{schem.data.name}

- {schem.data.name} + {schem.data.name}

{schem.data.description}

diff --git a/src/pages/regeln/index.astro b/src/pages/regeln/index.astro index fc19c64..3f567b3 100644 --- a/src/pages/regeln/index.astro +++ b/src/pages/regeln/index.astro @@ -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 { + 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);

{t("rules." + alt={t("rules." + value.data.translationKey + ".title")}>

{t(value.data.translationKey + ".title")}

{t("rules." + value.data.translationKey + ".description")}