From 4b85c2b30abe81eff121e1ac51e01353436243d3 Mon Sep 17 00:00:00 2001 From: Aelita4 Date: Sat, 23 Nov 2024 11:00:36 +0100 Subject: [PATCH] Add optional number input for ItemCard --- src/components/ItemCard.astro | 13 +++++++++---- src/pages/game/buildings.astro | 7 ++++--- src/pages/game/research.astro | 7 ++++--- src/pages/game/ships.astro | 34 +++++++++++++++++++++++++++++----- 4 files changed, 46 insertions(+), 15 deletions(-) diff --git a/src/components/ItemCard.astro b/src/components/ItemCard.astro index a7b3052..eb8fcf1 100644 --- a/src/components/ItemCard.astro +++ b/src/components/ItemCard.astro @@ -10,6 +10,7 @@ interface Props { image: string; button_type: string; button_name: string; + has_amount_input?: string; } const lang = await getLocales(Astro.cookies.get('language')?.value ?? await getHighestWeightedLanguage(Astro.request.headers.get('accept-language'))); @@ -17,10 +18,14 @@ const lang = await getLocales(Astro.cookies.get('language')?.value ?? await getH
-
{Astro.props.name} | {Astro.props.level}
-
{Astro.props.description} [more]
-
-
i
+
+ +
{Astro.props.name} | {Astro.props.level}
+
{Astro.props.description} [more]
+ +
i
+ {Astro.props.has_amount_input === "true" && } +