Create Aside for Cart
With Poster Cart component
This commit is contained in:
31
src/components/molecules/PosterCart.svelte
Normal file
31
src/components/molecules/PosterCart.svelte
Normal file
@@ -0,0 +1,31 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
// Components
|
||||
import Button from '$components/atoms/Button.svelte'
|
||||
import Image from '$components/atoms/Image.svelte'
|
||||
import Select from './Select.svelte'
|
||||
|
||||
const { locations, shop } = getContext('global')
|
||||
|
||||
</script>
|
||||
|
||||
<aside class="poster-cart">
|
||||
<div class="poster-cart__left">
|
||||
<img src="/images/issue-1.jpg" alt="">
|
||||
</div>
|
||||
<div class="poster-cart__right">
|
||||
<h3>Poster</h3>
|
||||
<p>Houses Of Melbourne – 30€</p>
|
||||
<Select
|
||||
name="quantity" id="filter_country"
|
||||
options={[
|
||||
{
|
||||
value: '1',
|
||||
name: '1',
|
||||
default: true,
|
||||
selected: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</aside>
|
||||
38
src/components/organisms/Cart.svelte
Normal file
38
src/components/organisms/Cart.svelte
Normal file
@@ -0,0 +1,38 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
// Components
|
||||
import Button from '$components/atoms/Button.svelte'
|
||||
import Image from '$components/atoms/Image.svelte'
|
||||
import PosterCart from '$components/molecules/PosterCart.svelte'
|
||||
|
||||
const { locations, shop } = getContext('global')
|
||||
|
||||
</script>
|
||||
|
||||
<aside class="cart">
|
||||
<header class="cart__heading">
|
||||
<h2>Cart</h2>
|
||||
<a class="text-label" href="#">Close</a>
|
||||
</header>
|
||||
|
||||
<div class="cart__content">
|
||||
<PosterCart />
|
||||
<PosterCart />
|
||||
</div>
|
||||
|
||||
<footer class="cart__total">
|
||||
<div class="cart__total--sum">
|
||||
<h3>Total</h3>
|
||||
<span>3 articles</span>
|
||||
<p>90€</p>
|
||||
</div>
|
||||
<div class="cart__total--checkout">
|
||||
<p>Shipping will be calculated from the delivery address during the checkout process</p>
|
||||
<Button
|
||||
text="Checkout"
|
||||
color="pink"
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
</footer>
|
||||
</aside>
|
||||
Reference in New Issue
Block a user