diff --git a/src/components/3d/PublicPreview.svelte b/src/components/publics/PublicPreview.svelte similarity index 97% rename from src/components/3d/PublicPreview.svelte rename to src/components/publics/PublicPreview.svelte index 26811da..503540c 100644 --- a/src/components/3d/PublicPreview.svelte +++ b/src/components/publics/PublicPreview.svelte @@ -45,7 +45,7 @@ camera = new THREE.PerspectiveCamera(fov, 1, near, far); renderer = new THREE.WebGLRenderer(); - renderer.setSize(500, 300); + renderer.setSize(500, 500); controls = new OrbitControls(camera, renderer.domElement); controls.autoRotate = true; controls.autoRotateSpeed = 1; @@ -113,7 +113,7 @@ } -
+
diff --git a/src/components/publics/XRayPreview.svelte b/src/components/publics/XRayPreview.svelte new file mode 100644 index 0000000..b458e98 --- /dev/null +++ b/src/components/publics/XRayPreview.svelte @@ -0,0 +1,52 @@ + + + + + diff --git a/src/content/publics/frostbite.json b/src/content/publics/frostbite.json index c63c3d8..af588e8 100644 --- a/src/content/publics/frostbite.json +++ b/src/content/publics/frostbite.json @@ -4,5 +4,6 @@ "id": 123, "creator": ["Test", "Test2"], "gamemode": "wargear", - "image": "../../images/WarGears.png" + "image": "../../images/2024-03-24_20.59.03.png", + "xray": "../../images/2024-03-24_20.59.59.png" } \ No newline at end of file diff --git a/src/images/2024-03-24_20.59.03.png b/src/images/2024-03-24_20.59.03.png new file mode 100644 index 0000000..2fcfc90 Binary files /dev/null and b/src/images/2024-03-24_20.59.03.png differ diff --git a/src/images/2024-03-24_20.59.59.png b/src/images/2024-03-24_20.59.59.png new file mode 100644 index 0000000..81d82de Binary files /dev/null and b/src/images/2024-03-24_20.59.59.png differ diff --git a/src/pages/publics/[schem].astro b/src/pages/publics/[schem].astro index 3952dcd..2f88ecb 100644 --- a/src/pages/publics/[schem].astro +++ b/src/pages/publics/[schem].astro @@ -2,7 +2,7 @@ import {createGetStaticPaths} from "astro-i18n"; import { getCollection, CollectionEntry } from "astro:content"; import PageLayout from "../../layouts/PageLayout.astro"; -import PublicPreview from "@components/3d/PublicPreview.svelte"; +import PublicPreview from "@components/publics/PublicPreview.svelte"; import { Image } from "astro:assets"; export const getStaticPaths = createGetStaticPaths(async () => { @@ -22,11 +22,11 @@ const { schem }: { schem: CollectionEntry<"publics">} = Astro.props; --- -

{schem.data.name}

- - {schem.data.name} +

{schem.data.name}

+ + {schem.data.name} -

{schem.data.description}

+

{schem.data.description}

Erbauer: {schem.data.creator.join(", ")}

diff --git a/src/pages/publics/index.astro b/src/pages/publics/index.astro index 85f2235..019de31 100644 --- a/src/pages/publics/index.astro +++ b/src/pages/publics/index.astro @@ -4,6 +4,7 @@ import {getCollection} from "astro:content"; import {l} from "../../util/util"; import { Image } from "astro:assets"; import Card from "@components/Card.svelte"; +import XRayPreview from "@components/publics/XRayPreview.svelte"; const publics = await getCollection("publics"); --- @@ -14,10 +15,13 @@ const publics = await getCollection("publics");
- {pub.data.name} + + {pub.data.name} + {pub.data.xray && {pub.data.name}} +
-

{pub.data.name}

-

{pub.data.description}

+

{pub.data.name}

+

{pub.data.description}

))}