-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.html
178 lines (164 loc) · 5.82 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="styles/checkout.css"/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Montserrat"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
/>
<link rel="stylesheet" href="./styles/navbar.css" />
<link rel="stylesheet" href="./styles/footer.css">
<link rel="icon" type="image/x-icon" href="./components/images/fevicon.png">
</head>
<body>
<div id="navbar"></div>
<!-- <div id="main"> -->
<div id="box1">
<!-- logo here -->
<div id="logo">
<img
src="https://cdn.shopify.com/s/files/1/0283/0185/2747/files/blm-checkout-logo.png?113278"
alt=""
/>
</div>
<div id="breadcrumb">
<ul>
<li><a href="./index.html">Home</a></li>
<li>
<a href="#"><i class="fa-solid fa-angle-right"></i></a>
</li>
<li>
<strong><a href="./Cart.html">Cart</a></strong>
</li>
<li>
<a href="#"><i class="fa-solid fa-angle-right"></i></a>
</li>
<li><a href="#">Shipping Details</a></li>
<li>
<a href="#"><i class="fa-solid fa-angle-right"></i></a>
</li>
</ul>
</div>
<div id="form">
<h2>Contact information</h2>
<input id="email" type="email" placeholder="Email" /><br />
<div class="checkbox1">
<input type="checkbox"/>
<p>Email me with news and offers</p>
</div>
<h2>Shipping address</h2>
<select id="select1">
<option value="">United states</option>
</select>
<br/>
<input type="text" id="fname" placeholder="First name" />
<input type="text" id="lname" placeholder="Last name" />
<br/>
<input type="text" id="address" placeholder="Address" />
<br/>
<input
id="aprment"
type="text"
placeholder="Apartment, suite, etc. (optional)"
/>
<br />
<input id="city" type="text" placeholder="City" />
<select id="select2">
<option value="">State</option>
<option value="">Alabama</option>
<option value="">Alaska</option>
<option value="">Arizona</option>
<option value="">Arkansas</option>
<option value="">California</option>
<option value="">Colorado</option>
<option value="">Delaeare</option>
<option value="">Florida</option>
<option value="">Georgia</option>
</select>
<input id="zip" type="text" placeholder="ZIP code" />
<br />
<div class="checkbox1">
<input type="checkbox" />
<p>Save this information for next time</p>
</div>
<br />
<p>
By continuing, you agree to Bluemercury's
<a href="#">Privacy Practices.</a>
</p>
<br />
<div id="buttom">
<p>
<i class="fa-solid fa-angle-left"></i
><a href="Cart.html" style="padding-left: 5px"> RETURN TO CART</a>
</p>
<button onclick="shopping()">Continue to shipping method</button>
</div>
<br />
<hr />
<p>All rights reserved bluemercury</p>
</div>
</div>
<div id="footer"></div>
</body>
</html>
<script
src="https://kit.fontawesome.com/3c324d3c0c.js"
crossorigin="anonymous"
></script>
<script type="module">
import { navbar } from "./components/modules/navbar.js";
// console.log(navbar());
document.getElementById("navbar").innerHTML = await navbar();
</script>
</script>
<script type="module">
import {footer} from "./components/modules/footer.js";
document.getElementById("footer").innerHTML=footer()
</script>
<script>
let flag=false;
let shopping = () => {
let email = document.querySelector("#email");
let name = document.querySelector("#fname").value;
let name2 = document.querySelector("#lname");
let address = document.querySelector("#address");
let apartment = document.querySelector("#aprment");
let zip = document.querySelector("#zip")
if (email.value === "" ||name.value === "" ||name2.value === ""
||address.value === "" ||apartment.value === "" ) {
document.querySelector("#email").style.border = "solid red";
document.querySelector("#fname").style.border = "solid red";
document.querySelector("#lname").style.border = "solid red";
document.querySelector("#address").style.border = "solid red";
document.querySelector("#aprment").style.border = "solid red";
alert("Fill all fields")
} else {
document.querySelector("#email").style.border = "solid black";
document.querySelector("#fname").style.border = "solid black";
document.querySelector("#lname").style.border = "solid black";
document.querySelector("#address").style.border = "solid black";
document.querySelector("#aprment").style.border = "solid black";
alert (`${name} Your order is placed succefully`)
window.location.href="index.html"
}
};
</script>
<script type="module">
import {footer} from "./components/modules/footer.js";
document.getElementById("footer").innerHTML= await footer()
</script>
<!-- footer -->
</script>
<script type="module">
import {footer} from "./components/modules/footer.js";
document.getElementById("footer").innerHTML=footer()
</script>