-
Notifications
You must be signed in to change notification settings - Fork 0
/
carsummary.html
294 lines (260 loc) · 8.48 KB
/
carsummary.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!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">
<script src="https://kit.fontawesome.com/a627da3621.js" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
<title>Car Summary </title>
<style>
* {
box-sizing: border-box;
padding: 0;
margin: 0;
font-family: 'Roboto', sans-serif;
}
/* navbar css */
#navbar {
color: white;
background-color: black;
position: sticky;
top: 0px;
display: flex;
justify-content: space-between;
padding: 20px;
z-index: 1;
}
#navbar>div:first-child {
display: flex;
justify-content: space-around;
align-items: center;
width: 20%;
font-size: 1.4rem;
}
#navbar>div:first-child>img {
width: 190px;
}
#navbar>div:first-child>img:hover {
cursor: pointer;
}
#navbar>div:last-child {
display: flex;
justify-content: space-between;
align-items: center;
width: 42%;
font-size: .9rem;
}
#navbar>div:last-child>h2:first-child {
background-color: white;
color: black;
border-radius: 16px;
padding: 5px 15px;
}
#navbar>div>div {
display: flex;
width: 25%;
justify-content: space-between;
}
#navbar>div>div>a {
text-decoration: none;
color: white;
}
/* main box css */
#main {
width: 74%;
height: 600px;
/* border: 1px solid black; */
margin: auto;
margin-top: 40px;
display: flex;
justify-content: space-between;
}
#pay {
width: 47%;
height: 100%;
/* border: 1px solid blue; */
}
#detail {
width: 47%;
height: 100%;
}
#pay>div {
width: 100%;
padding: 30px;
height: 90%;
margin-top: 20px;
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(6, 70px);
/* column-gap: 70px; */
color: #1f4a60;
}
#pay>div>p {
border-bottom: 1px solid #1f4a60;
margin-top: 10px;
margin-bottom: 10px;
}
#pay>div>p:nth-child(even) {
text-align: right;
}
#pay>div>a {
grid-area: 7/2 span/8/3;
padding: 0px;
margin-top: 12px;
background-color: #47b847;
color: white;
border: none;
border-radius: 15px;
font-size: 17px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
}
/* details css */
#detail>div {
height: 69%;
width: 100%;
margin-top: 20px;
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}
#detail img {
width: 45%;
padding: 0px;
}
#detail>div>div:first-child {
width: 100%;
height: 40%;
background-color: #f5f5f5;
display: flex;
justify-content: space-between;
}
#detail>div>div>div {
width: 70%;
display: flex;
padding-left: 17px;
flex-direction: column;
gap: 12px;
justify-content: center;
align-items: center;
}
#pickup,
#start,
#end,
#fuel,
#star {
display: flex;
color: #0c1418;
gap: 5px;
padding-left: 6px;
padding: 12px;
margin-top: 4px;
}
#start>i {
color: green;
}
#end>i {
color: red;
}
#star>i {
color: gold;
}
</style>
</head>
<body>
<!-- navbar div -->
<div id="navbar">
<div>
<h3><i class="fa-solid fa-bars"></i></h3>
<a href="home.html"> <img src="https://www.zoomcar.com/build/98e56e8b0b91e8806885a22ac2bf69a7.png"
alt="ZOOMCAR"></a>
</div>
<div>
<h2>Become a Host</h2>
<h2>ZMS</h2>
<div>
<a href="signup.html">
<h2>Signup</h2>
</a>
<a href="login.html">
<h2>Login</h2>
</a>
</div>
</div>
</div>
<div id="main">
<div id="pay">
<h2>Checkout Summary</h2>
<div>
<p>Trip Fare (Unlimited KMs without Fuel)</p>
<p><i class="fa-sharp fa-solid fa-indian-rupee-sign"></i><span></span></p>
<p>Damage Protection Fee</p>
<p>+ ₹290</p>
<p>Convenience Fee</p>
<p>+ ₹99</p>
<p>Total Fare</p>
<p><i class="fa-sharp fa-solid fa-indian-rupee-sign"></i><span></span></p>
<p>Refundable Deposit
Has been waived off for this booking</p>
<p>+ ₹0</p>
<p>Final Fare</p>
<p><i class="fa-sharp fa-solid fa-indian-rupee-sign"></i><span></span></p>
<!-- <button></button> -->
<a href="payment.html">PROCEED TO PAY <i
class="fa-sharp fa-solid fa-indian-rupee-sign"></i><span></span></a>
</div>
</div>
<div id="detail">
<h2>Booking Details</h2>
<div>
<div>
<div>
<h2 id="carName"></h2>
<p id="seats"></p>
</div>
<img src="" id="detailImg" alt="">
</div>
<div id="pickup"><i class="fa-solid fa-circle"></i>
<h4>Pickup Location :</h4> <span></span>
</div>
<div id="start"><i class="fa-solid fa-circle"></i>
<h4>Start Date :</h4><span></span>
</div>
<div id="end"><i class="fa-solid fa-circle"></i>
<h4>End Date :</h4> <span></span>
</div>
<div id="fuel"><i class="fa-sharp fa-solid fa-road"></i>
<p>Unlimited Kms without Fuel</p>
</div>
<div id="star"><i class="fa-solid fa-star"></i>
<p></p>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
let choosen = JSON.parse(localStorage.getItem("car-choose"))
document.querySelector("#pay>div>p:nth-child(2)>span").innerText = choosen.Price
let payable = Number(choosen.Price) + 290 + 99;
document.querySelector("#pay>div>p:nth-child(8)>span").innerText = payable
document.querySelector("#pay>div>p:nth-child(12)>span").innerText = payable
document.querySelector("#pay>div>a>span").innerText = payable
document.querySelector("#pay>div>a").addEventListener("click", payAmount)
function payAmount() {
localStorage.setItem("pay-amount", payable)
}
document.getElementById("carName").innerText = choosen.Name
document.getElementById("seats").innerText = choosen.Seats
document.getElementById("detailImg").src = choosen.Image
document.querySelector("#star>p").innerText = choosen.Star + "--" + "(" + choosen.Popularity + ")" + "--" + choosen["Km-drive"] + "K kms driven"
let dateData = JSON.parse(localStorage.getItem("Round-Trip"))
document.querySelector("#pickup>span").innerText = dateData.place
document.querySelector("#start>span").innerText = dateData.fromDate
document.querySelector("#end>span").innerText = dateData.toDate
</script>