-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.html
120 lines (110 loc) · 5.76 KB
/
checkout.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Checkout - Homeboy Coffee Shop">
<title>Checkout - Homeboy Coffee Shop</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/checkout.css">
<link rel="icon" href="images/favicon.ico" type="image/x-icon"> <!-- Add Favicon -->
</head>
<body class="bg-gray-100 font-sans">
<!-- Header -->
<div id="header"></div>
<!-- Checkout Form -->
<main class="container mx-auto px-6 py-12">
<h1 class="text-4xl font-bold text-center mb-8">Checkout</h1>
<form id="checkout-form" class="bg-white p-6 rounded-lg shadow-lg">
<!-- Personal Information -->
<h2 class="text-2xl font-semibold mb-4">Personal Information</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="first-name" class="block text-gray-600">First Name</label>
<input type="text" id="first-name" class="input-field" placeholder="Enter your first name" required>
</div>
<div>
<label for="last-name" class="block text-gray-600">Last Name</label>
<input type="text" id="last-name" class="input-field" placeholder="Enter your last name" required>
</div>
</div>
<div class="mt-4">
<label for="email" class="block text-gray-600">Email</label>
<input type="email" id="email" class="input-field" placeholder="Enter your email" required>
</div>
<div class="mt-4">
<label for="phone" class="block text-gray-600">Phone</label>
<input type="tel" id="phone" class="input-field" placeholder="Enter your phone number" required>
</div>
<!-- Shipping Information -->
<h2 class="text-2xl font-semibold mt-8 mb-4">Shipping Information</h2>
<div class="mt-4">
<label for="address" class="block text-gray-600">Address</label>
<input type="text" id="address" class="input-field" placeholder="Enter your address" required>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-4">
<div>
<label for="city" class="block text-gray-600">City</label>
<input type="text" id="city" class="input-field" placeholder="City" required>
</div>
<div>
<label for="state" class="block text-gray-600">State</label>
<input type="text" id="state" class="input-field" placeholder="State" required>
</div>
<div>
<label for="zip" class="block text-gray-600">Zip Code</label>
<input type="text" id="zip" class="input-field" placeholder="Zip Code" required>
</div>
</div>
<!-- Payment Information -->
<h2 class="text-2xl font-semibold mt-8 mb-4">Payment Information</h2>
<div class="payment-methods flex flex-col gap-4">
<label class="payment-option">
<input type="radio" name="payment-method" value="credit-card" checked>
<span>Credit/Debit Card</span>
</label>
<div id="credit-card-details" class="payment-details">
<label for="card-number" class="block text-gray-600">Card Number</label>
<input type="text" id="card-number" class="input-field" placeholder="1234 5678 9012 3456" required>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
<div>
<label for="expiry-date" class="block text-gray-600">Expiry Date</label>
<input type="text" id="expiry-date" class="input-field" placeholder="MM/YY" required>
</div>
<div>
<label for="cvv" class="block text-gray-600">CVV</label>
<input type="text" id="cvv" class="input-field" placeholder="CVV" required>
</div>
</div>
</div>
<label class="payment-option">
<input type="radio" name="payment-method" value="paypal">
<span>PayPal</span>
</label>
<div id="paypal-details" class="payment-details hidden">
<p class="text-gray-600">You will be redirected to PayPal to complete your purchase.</p>
</div>
<label class="payment-option">
<input type="radio" name="payment-method" value="google-pay">
<span>Google Pay</span>
</label>
<div id="google-pay-details" class="payment-details hidden">
<p class="text-gray-600">You will be redirected to Google Pay to complete your purchase.</p>
</div>
</div>
<!-- Order Summary -->
<h2 class="text-2xl font-semibold mt-8 mb-4">Order Summary</h2>
<div id="order-summary" class="bg-gray-100 p-4 rounded-lg mb-4">
<!-- Populated by checkout.js -->
</div>
<!-- Submit Button -->
<button type="submit" class="w-full bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600">
Place Order
</button>
</form>
</main>
<!-- Footer -->
<div id="footer"></div>
<script src="js/checkout.js"></script>
</body>
</html>