-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcart.html
More file actions
84 lines (84 loc) · 3.01 KB
/
Copy pathcart.html
File metadata and controls
84 lines (84 loc) · 3.01 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<title>Shopping Cart</title>
</head>
<body class="bg-gray-100 text-gray-800">
<header class="bg-gray-800 text-white p-4">
<h1 class="text-2xl text-center">Shopping Cart</h1>
<nav class="flex justify-center mt-2 space-x-4">
<a href="/" class="hover:underline">Home</a>
<a href="index.html" class="hover:underline">Shop</a>
<a href="about.html" class="hover:underline">About</a>
<a href="contact.html" class="hover:underline">Contact</a>
</nav>
</header>
<section
id="cart-page"
class="max-w-3xl mx-auto bg-white p-6 mt-6 rounded-lg shadow-lg"
>
<h2 class="text-xl font-semibold text-center mb-4">Your Cart</h2>
<div id="products" class="space-y-4">
<div class="cart-item flex items-center p-4 bg-gray-100 rounded-lg">
<img
src="https://via.placeholder.com/80"
alt="Product"
class="w-20 h-20 rounded-lg object-cover"
/>
<div class="info flex-1 ml-4">
<h3 class="text-lg font-medium">Classic T-Shirt</h3>
<p class="text-gray-600">$20.00</p>
</div>
<button
class="remove-btn bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600"
>
Remove
</button>
</div>
<div class="cart-item flex items-center p-4 bg-gray-100 rounded-lg">
<img
src="https://via.placeholder.com/80"
alt="Product"
class="w-20 h-20 rounded-lg object-cover"
/>
<div class="info flex-1 ml-4">
<h3 class="text-lg font-medium">Modern Fit T-Shirt</h3>
<p class="text-gray-600">$25.00</p>
</div>
<button
class="remove-btn bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600"
>
Remove
</button>
</div>
</div>
<p id="cart-total" class="text-right text-center font-semibold mt-4">
Total: $45.00
</p>
<button
class="block w-full bg-blue-500 text-white py-3 mt-4 rounded-lg text-center hover:bg-blue-600"
onclick="window.location.href='/#products';"
>
continue purchasing
</button>
<button
id="checkout-button"
class="block w-full bg-blue-500 text-white py-3 mt-4 rounded-lg text-center hover:bg-blue-600"
>
Checkout
</button>
</section>
<div class="min-h-screen flex flex-col">
<main class="flex-grow">
<!-- Main content goes here -->
</main>
<footer class="bg-gray-800 text-white text-center p-10">
<p>© 2025 E-Commerce Store. All Rights Reserved.</p>
</footer>
</div>
<script src="cart.js"></script>
</body>
</html>