From db6df2053a9275f199bcdf129b23bff365067cb4 Mon Sep 17 00:00:00 2001 From: june Date: Wed, 13 Aug 2025 19:46:34 +1200 Subject: [PATCH] [PIE-11] Add option to change from table to list view (!9) Option interface not implemented, will be in a future settings page. But anyway idk i like the table view more Co-authored-by: june Co-committed-by: june --- .../Detail/IngredientTableView.astro | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/src/components/Detail/IngredientTableView.astro b/src/components/Detail/IngredientTableView.astro index 1f38027..5ee0c05 100644 --- a/src/components/Detail/IngredientTableView.astro +++ b/src/components/Detail/IngredientTableView.astro @@ -2,41 +2,43 @@ // const { ingredients } = Astro.props const { class: className, ingredients } = Astro.props +const tableView = true --- - + +)} - - - - - - - - - - { - ingredients.map(ing => ( - <> - - - - - - - )) - } - -
QuantityUnitFood
{ing.quantity}{ing.unit}{ing.name}
\ No newline at end of file +{tableView && ( + + + + + + + + + + { + ingredients.map(ing => ( + <> + + + + + + + )) + } + +
QuantityUnitIngredient
{ing.quantity}{ing.unit}{ing.name}
+)} \ No newline at end of file