-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (52 loc) · 2.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./output.css">
<title>Mini Shopping cart</title>
</head>
<body>
<!-- NAV -->
<nav class="bg-white z-20 fixed w-full top-0 left-0 mb-4 flex justify-end ">
<button id="cart-btn" class="px-6 py-3 bg-black text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
id="show-hide-cart" class=" w-8 h-8">
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
</svg>
</button>
<!-- SHOW CART -->
<div id="cart-container" class="absolute top-16 right-0 border-2 rounded-md text-center bg-white p-4 hidden overflow-auto max-h-[80vh] ">
<div class="flex justify-end pb-4">
<button id="clear-cart-btn" class="text-gray-700 hover:text-gray-800">
<svg class="h-6 w-6 " fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<div id="products-container" class="transform transition ease-in-out duration-500 ."></div>
<p>Total number of items: <span id="total-items">0</span></p>
<p>Total: <span id="total">$0</span></p>
<div class="mt-6">
<a href="#"
class="flex items-center justify-center rounded-md border border-transparent bg-gray-900 px-6 py-3 text-base font-medium text-white shadow-sm hover:bg-gray-700">Checkout</a>
</div>
</div>
</div>
</nav>
<div class="bg-white pt-8 lg:px-24">
<div class="mx-auto p-4 lg:px-8">
<h2 class="text-2xl font-bold tracking-tight text-gray-900">New Arrivals</h2>
<div class="mt-6 grid grid-cols-1 gap-x-8 gap-y-8 sm:grid-cols-2 lg:grid-cols-4 xl:gap-x-8 pt-8"
id="product-card-container">
</div>
</div>
</div>
<div class="text-gray-800 text-center mt-4 pb-4">
Made with 💙 by <a href="https://github.com/Bridgetamana" class="hover:underline">Bridget Amana</a>
</div>
<script src="./script.js"></script>
</body>
</html>