forked from imran120198/Orbitz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththings todo pune.html
573 lines (483 loc) · 18.3 KB
/
things todo pune.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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<!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>Things to do in Pune</title>
<style>
/* navbar */
body {
margin: 0px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
#navbar {
width: 100%;
height: 72px;
color: whitesmoke;
background-color: #00253c;
display: flex;
align-content: center;
justify-content: space-around;
}
#navbar>div:first-child {
display: flex;
}
#navbar>div:nth-child(2) {
display: flex;
}
#navbar>div>div {
height: auto;
width: auto;
margin-top: auto;
display: flex;
}
#MoreTravel {
margin-top: -65px;
font-size: 14px;
font-weight: bold;
background-color: #00253c;
border: 0px;
color: white;
margin-left: 55px;
}
#MoreTravel>option {
background-color: white;
color: black;
font-weight: 700;
font-size: large;
}
#nav_2box {
text-align: right;
}
#nav_2box div {
font-size: 14px;
font-weight: bold;
margin-left: 30px;
margin-bottom: 30px;
}
#navbar img {
margin-top: -50px;
width: 169px;
height: 32px;
cursor: pointer;
}
#MoreTravel:hover {
color: teal;
}
#MoreTravel option:hover {
color: teal;
}
#nav_2box div:hover {
color: teal;
}
/* INFO */
#searchFilter {
display: flex;
width: 50%;
margin: auto;
margin-top: 30px !important;
justify-content: space-evenly;
text-align: center;
}
#sorter,
#searcher,
#rater {
padding: 10px;
width: 30%;
}
#container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, fit-content);
grid-auto-flow: row;
row-gap: 30px;
width: 70%;
margin: auto;
margin-top: 30px !important;
margin-bottom: 30px !important;
}
#container>.boxes {
width: 90%;
height: 100%;
box-sizing: border-box;
text-align: center;
margin: auto;
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.boxes>img {
width: 100%;
}
.boxes>.priceDiv {
display: flex;
margin-top: -10px;
justify-content: space-around;
}
.boxes>.ratePara {
display: flex;
justify-content: space-around;
margin-top: -30px;
margin-bottom: 10px;
color: gray;
}
.boxes>#cart {
padding: 10px;
font-weight: bold;
background-color: #C83259;
color: white;
border: 0px;
width: 70%;
margin-bottom: 30px;
cursor: pointer;
}
.boxes>#cart:hover {
padding: 10px;
font-weight: bold;
background-color: #e95079;
color: white;
border: 0px;
width: 70%;
margin-bottom: 30px;
}
/* footer */
.one {
height: 450px;
width: 85%;
margin: auto;
display: flex;
}
.two {
height: 350px;
width: 20%;
margin: auto;
color: #6bafcd;
font-size: 14px;
}
.two>p {
margin-bottom: 30px;
}
.two>p>a {
text-decoration: none;
color: #007E8F;
}
.two>p>a:hover {
text-decoration: none;
color: #007E8F;
border-bottom: 1px solid #007E8F;
}
.imgFooter {
height: 22px;
width: 150px;
margin: 15px 0px 0px 20px;
}
.three {
height: 100px;
margin: auto;
margin-top: 150px !important;
text-align: center;
font-size: 12px;
color: #616161;
}
.three>hr {
width: 85%;
border-top: 1px;
color: black;
margin-bottom: 30px;
}
</style>
</head>
<body>
<!-- navbar -->
<div id="navbar">
<div>
<div><img src="https://www.orbitz.com/_dms/header/logo.svg?locale=en_US&siteid=70201&2" alt="orbitz logo"
id="homepageImg">
</div>
<div> <select name="More Travel" id="MoreTravel" placeholder="Travel">
<option value="">More Travel</option>
<option value="Stays">Stays</option>
<option value="Cars">Cars</option>
<option value="ThingsToDo">Things to do</option>
<option value="TravelBlog">Travel blog</option>
</select>
</div>
</div>
<div id="nav_2box">
<div id="Espanol">Espanol</div>
<div id="listYourPriority">List your Property</div>
<div id="support">Support</div>
<div id="trips">Trips</div>
<div id="signIn">Sign in</div>
</div>
</div>
<!-- INFO -->
<div id="searchFilter">
<select id="sorter">
<option value="">Sort By Price</option>
<option value="l2h">Low To High</option>
<option value="h2l">High To Low</option>
</select>
<select id="rater">
<option value="">Sort By Rating</option>
<option value="l2h">Low To High</option>
<option value="h2l">High To Low</option>
</select>
</div>
<div id="container"></div>
<!-- footer -->
<div class="one">
<div class="two">
<a href="https://www.expediagroup.com/home/default.aspx">
<img class="imgFooter"
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSUYasxycXsGsRvvgy-7RqeSGsl6nmXvWy5Cw&usqp=CAU"
alt="expedia group" />
</a>
</div>
<div class="two">
<p style="color:black"><b>Company</b></p>
<p><a href="about us.html">About</a></p>
<p><a href="about us.html">Jobs</a></p>
<p><a href="about us.html">List your property</a></p>
<p><a href="about us.html">Partnerships</a></p>
<p><a href="about us.html">Newsroom</a></p>
<p><a href="about us.html">Investor Relation</a></p>
<p><a href="about us.html">Site Map</a></p>
<p><a href="about us.html">Orbital Rewards</a></p>
<p><a href="about us.html">Advertising</a></p>
</div>
<div class="two">
<p style="color:black"><b>Explore</b></p>
<p><a href="all hotels.html">Hotels in United States</a></p>
<p><a href="all hotels.html">Vacation Rentals in United States</a></p>
<p><a href="all hotels.html">Cars Rentals in United States</a></p>
<p><a href="all hotels.html">Domestics Flights</a></p>
<p><a href="all hotels.html">Vacation Packages In United States</a></p>
<p><a href="all hotels.html">Orbitz Reviews</a></p>
<p><a href="all hotels.html">Orbitz Coupons</a></p>
<p><a href="all hotels.html">LGBTQ Travel</a></p>
<p><a href="all hotels.html">Unique Accommodation</a></p>
<p><a href="all hotels.html">Travel Blog</a></p>
</div>
<div class="two">
<p style="color:black"><b>Policies</b></p>
<p><a href="privacy policy.html">Privacy Policy</a></p>
<p><a href="privacy policy.html">Terms of Use</a></p>
<p><a href="privacy policy.html">Orbitz Rewards Terms</a></p>
<p><a href="privacy policy.html">Do not sell my personal information</a></p>
</div>
<div class="two">
<p style="color:black"><b>Help</b></p>
<p><a href="support.html">Support</a></p>
<p><a href="support.html">Cancel your hotel or vacation rental booking</a></p>
<p><a href="support.html">Cancel your flight</a></p>
<p><a href="support.html">Refund timelines,policies & processes</a></p>
<p><a href="support.html">Use an Orbitz Coupon</a></p>
</div>
</div>
<div class="three">
<hr>
<p>© 2022 Orbitz, LLC, an Expedia Group Company. All rights reserved.</p>
<p>Orbitz, Orbitz.com, and the Orbitz logo are trademarks or registered trademarks of Orbitz, LLC. CST#
2083930-50.</p>
</div>
</body>
</html>
<script>
//NAVBAR
document.querySelector("#homepageImg").addEventListener("click", openHomepage);
function openHomepage() {
event.preventDefault();
window.open("index.html", "_self");
}
var navbarSelect = document.querySelector("#MoreTravel");
navbarSelect.addEventListener("click", function () {
event.preventDefault();
if (navbarSelect.value == "Stays") {
window.open("all hotels.html", "_self");
}
else if (navbarSelect.value == "Cars") {
window.open("cars data.html", "_self");
}
else if (navbarSelect.value == "ThingsToDo") {
window.open("things to do.html", "_self");
}
else if (navbarSelect.value == "TravelBlog") {
window.open("https://www.orbitz.com/blog/", "_self");
}
})
document.querySelector("#Espanol").addEventListener("click", function () {
alert("Update yet to be added!");
})
document.querySelector("#listYourPriority").addEventListener("click", function () {
alert("Update yet to be added!");
})
document.querySelector("#support").addEventListener("click", function () {
window.open("support.html", "_self");
})
document.querySelector("#trips").addEventListener("click", function () {
window.open("trips.html", "_self");
})
document.querySelector("#signIn").addEventListener("click", function () {
window.open("create account.html", "_self");
})
//MAIN
var thingsToDoPune = [
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune walking tour with a Punekar',
image: 'https://mediaim.expedia.com/localexpert/2331514/ea1a9cf7-565c-46d5-ba66-c402e61e2c0b.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 3,
price: 1000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Full day guided tour of Pune',
image: 'https://mediaim.expedia.com/localexpert/3090905/0707e486-3059-4b3c-a352-9cd5f8958484.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 5,
price: 3000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune to Mahabaleshwar trip',
image: 'https://mediaim.expedia.com/localexpert/3299107/489e88f5-9b87-4511-83a9-79cb9353e09b.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 4,
price: 5000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune to Bhimashankar trip',
image: 'https://mediaim.expedia.com/localexpert/3299113/082455a0-5b62-42a3-b2e8-9fd715d71e04.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 4,
price: 4000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Lakeside camping at Pawna lake',
image: 'https://mediaim.expedia.com/localexpert/2972874/65800639-fd17-4e24-973e-2917c46184c0.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 5,
price: 2500
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune heritage guided tour',
image: 'https://mediaim.expedia.com/localexpert/2977365/eb38dcc9-0dcd-4b71-9be9-58d67641d8db.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 5,
price: 3000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Tour to Sinhgad fort, Khadakwasla dam and Panshet dam',
image: 'https://mediaim.expedia.com/localexpert/2113181/94a5a134-a0a7-486c-ad7e-9fa590f19c0e.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 4,
price: 4500
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune food tasting tour',
image: 'https://mediaim.expedia.com/localexpert/2111058/fb0bb2e6-31ea-42e8-9722-78787887a377.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 5,
price: 2000
},
{
city: 'PUNE',
dataType: "thingstodo",
title: 'Pune heritage cycle ride',
image: 'https://mediaim.expedia.com/localexpert/2168847/a04d6027-0f3a-4d83-a379-52896807991a.jpg?impolicy=resizecrop&rw=1005&rh=565',
rating: 3,
price: 1500
}
];
localStorage.setItem("thingsToDoPune", JSON.stringify(thingsToDoPune));
var thingsToDoPune = JSON.parse(localStorage.getItem("thingsToDoPune"));
dispplayData(thingsToDoPune);
var currentUser = JSON.parse(localStorage.getItem("currentUser"));
var loggedInEmail;
var loggedInName;
currentUser.map(function (elem) {
loggedInEmail = elem.Email;
loggedInName = elem.FirstName;
//console.log(loggedInEmail,loggedInName);
})
var tripArr = JSON.parse(localStorage.getItem(loggedInEmail)) || [];
function dispplayData(thingsToDoPune) {
document.querySelector("#container").innerHTML = "";
thingsToDoPune.map(function (elem) {
var mainDiv = document.createElement("div");
var img = document.createElement("img");
img.setAttribute("src", elem.image);
var name = document.createElement("h3");
name.innerText = elem.title;
name.setAttribute("class", "name");
var innerDiv = document.createElement("div");
var price = document.createElement("p");
price.innerText = "INR " + elem.price;
var rating = document.createElement("p");
rating.innerText = elem.rating + " / 5";
innerDiv.append(price, rating);
innerDiv.setAttribute("class", "priceDiv");
var perNight = document.createElement("p");
perNight.innerText = "Per person";
var ratingGiven = document.createElement("p");
ratingGiven.innerText = "Rating";
var ratePara = document.createElement("div");
ratePara.append(perNight, ratingGiven);
ratePara.setAttribute("class", "ratePara")
var cart = document.createElement("button");
cart.innerText = "Book";
cart.setAttribute("id", "cart");
cart.addEventListener("click", function () {
addToCart(elem);
});
mainDiv.setAttribute("class", "boxes")
mainDiv.append(img, name, innerDiv, ratePara, cart);
document.querySelector("#container").append(mainDiv);
});
}
function addToCart(elem) {
tripArr.push(elem);
localStorage.setItem(loggedInEmail, JSON.stringify(tripArr));
console.log(tripArr);
}
document.querySelector("#sorter").addEventListener("click", sortByPrice);
function sortByPrice() {
thingsToDoPune.map(function (elem) {
var sorting = document.querySelector("#sorter").value;
console.log(sorting);
if (sorting == "l2h") {
thingsToDoPune.sort(function (a, b) {
return a.price - b.price;
})
dispplayData(thingsToDoPune)
}
else if (sorting == "h2l") {
thingsToDoPune.sort(function (a, b) {
return b.price - a.price;
})
dispplayData(thingsToDoPune)
}
})
}
document.querySelector("#rater").addEventListener("click", sortByRating);
function sortByRating() {
thingsToDoPune.map(function (elem) {
var rating = document.querySelector("#rater").value;
console.log(rating);
if (rating == "l2h") {
thingsToDoPune.sort(function (a, b) { return a.rating - b.rating })
dispplayData(thingsToDoPune)
}
else if (rating == "h2l") {
thingsToDoPune.sort(function (a, b) { return b.rating - a.rating })
dispplayData(thingsToDoPune)
}
})
}
</script>