From f97d394eb4a40eea30bf53753027a393d1c15e0f Mon Sep 17 00:00:00 2001 From: Aelita4 Date: Fri, 23 Aug 2024 17:12:45 +0200 Subject: [PATCH] Change BuildingCard to generic ItemCard --- .../{BuildingCard.astro => ItemCard.astro} | 32 ++++++++++--------- src/pages/game/buildings.astro | 6 ++-- 2 files changed, 21 insertions(+), 17 deletions(-) rename src/components/{BuildingCard.astro => ItemCard.astro} (66%) diff --git a/src/components/BuildingCard.astro b/src/components/ItemCard.astro similarity index 66% rename from src/components/BuildingCard.astro rename to src/components/ItemCard.astro index 7ac108e..b0c10e6 100644 --- a/src/components/BuildingCard.astro +++ b/src/components/ItemCard.astro @@ -6,23 +6,25 @@ interface Props { name: string; description: string; image: string; + button_type: string; + button_name: string; } const lang = await getLocales(await getHighestWeightedLanguage(Astro.request.headers.get('accept-language'))); --- -
- -
-
{Astro.props.name}
-
{Astro.props.description}
- {getName(lang, "general", "nav-build")} -
i
+
+ +
+
{Astro.props.name}
+
{Astro.props.description}
+ {getName(lang, Astro.props.button_type, Astro.props.button_name)} +
i