From c721a80ff213d3665d4bfa9fd540928654f73ae0 Mon Sep 17 00:00:00 2001 From: tree Date: Sat, 16 Mar 2024 23:55:05 +0100 Subject: [PATCH] show event assets in detail --- src/core.json | 2 +- src/pages/event/[id].astro | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/core.json b/src/core.json index c111082..8ccbd78 100644 --- a/src/core.json +++ b/src/core.json @@ -1256,7 +1256,7 @@ "mykola-siusko" ], "design": { - "image": "summit02" + "image": "prague01" }, "images": { "poster-simple": "https://data.web3privacy.info/img/events/2024/s24prg-poster-simple.png", diff --git a/src/pages/event/[id].astro b/src/pages/event/[id].astro index a907928..ca579c7 100644 --- a/src/pages/event/[id].astro +++ b/src/pages/event/[id].astro @@ -20,6 +20,13 @@ const eventPoster = getEventPoster(item) const eventHeader = item.images?.wide const banner = eventHeader ? { img: eventHeader } : false +const imageFormats = { + "poster-simple": { name: "Poster (simple)"}, + "square": { name: "Square" }, + "wide-square": { name: "Wide-square" }, + "wide": { name: "Wide" }, +} + --- @@ -106,6 +113,23 @@ const banner = eventHeader ? { img: eventHeader } : false + + {item.images && item.images.poster && +
+

Event assets

+
+ {Object.keys(imageFormats).map((format) => ( +
+
{imageFormats[format].name}
+ +
+ ))} +
+
+ + }
\ No newline at end of file