From f15a2f2e4711e9b79713502615f0cab7fa3f3a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Mon, 6 Dec 2021 22:14:02 +0100 Subject: [PATCH] Add entering transition on Shop and fix some styling - Center intro title vertically - Cart item styling tweaks - Add cart button quantity label inside of button so it's clickable --- src/components/atoms/ButtonCart.svelte | 7 ++-- src/components/molecules/CartItem.svelte | 5 ++- src/components/organisms/Cart.svelte | 4 +- src/routes/shop/__layout.svelte | 49 +++++++++++++++++++++++- src/style/atoms/_button-cart.scss | 12 ++++-- src/style/molecules/_cart-item.scss | 5 ++- src/style/pages/shop/_intro.scss | 5 ++- 7 files changed, 72 insertions(+), 15 deletions(-) diff --git a/src/components/atoms/ButtonCart.svelte b/src/components/atoms/ButtonCart.svelte index 543ee6d..9144af1 100644 --- a/src/components/atoms/ButtonCart.svelte +++ b/src/components/atoms/ButtonCart.svelte @@ -14,9 +14,8 @@
+ {#if $cartAmount > 0} + {$cartAmount} + {/if} - - {#if $cartAmount > 0} - {$cartAmount} - {/if}
\ No newline at end of file diff --git a/src/components/molecules/CartItem.svelte b/src/components/molecules/CartItem.svelte index 7952c95..bd35771 100644 --- a/src/components/molecules/CartItem.svelte +++ b/src/components/molecules/CartItem.svelte @@ -30,7 +30,10 @@

Poster

-

{item.product.name} – {item.price_total}€

+

+ {item.product.name} +
– {item.price}€ +

{#if item && item.quantity}