-
Notifications
You must be signed in to change notification settings - Fork 595
/
affordable-destinations.html
231 lines (205 loc) · 6.28 KB
/
affordable-destinations.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Best and Affordable Destinations</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 0;
padding: 20px;
background-color: #f8f9fa;
}
.destination-item {
border: 1px solid #ccc;
padding: 15px;
margin: 20px;
border-radius: 10px;
background-color: #fff;
display: inline-block;
width: calc(33% - 40px);
max-width: 300px;
text-align: center;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: transform 0.3s, box-shadow 0.3s;
}
.destination-item:hover {
transform: translateY(-10px);
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.destination-item img {
width: 100%;
border-radius: 10px 10px 0 0;
}
.destination-item h2 {
font-size: 1.5em;
margin: 10px 0;
}
.destination-item p {
margin: 5px 0;
}
.destination-item .price {
font-weight: bold;
}
.book-now-btn {
margin-top: 10px;
padding: 10px 20px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, box-shadow 0.3s;
text-align: center;
}
.book-now-btn:hover {
background-color: #0056b3;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
#back-button {
margin-top: 20px;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
background-color: #6c757d;
color: white;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
}
#back-button:hover {
background-color: #5a6268;
}
@media (max-width: 768px) {
.destination-item {
width: calc(50% - 40px);
}
}
@media (max-width: 576px) {
.destination-item {
width: calc(100% - 40px);
}
}
body {
background-color: #f7f7fc;
overflow-x: hidden; /* Prevent horizontal scrolling */
}
.background-circles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none; /* Prevent interaction with the background elements */
z-index: -1; /* Ensure circles are in the background */
}
.circle {
position: absolute;
background-color: rgba(167, 139, 250, 0.3);
border-radius: 50%;
opacity: 0.8;
}
/* Define the sizes and positions of the circles */
.circle1 {
width: 10vw;
height: 10vw;
top: 10%;
left: 20%;
}
.circle2 {
width: 15vw;
height: 15vw;
top: 30%;
right: 10%;
}
.circle3 {
width: 5vw;
height: 5vw;
top: 60%;
left: 40%;
}
.circle4 {
width: 12vw;
height: 12vw;
bottom: 20%;
right: 25%;
}
.circle5 {
width: 8vw;
height: 8vw;
bottom: 15%;
left: 10%;
}
.circle6 {
width: 20vw;
height: 20vw;
top: 5%;
right: 15%;
}
.circle7 {
width: 7vw;
height: 7vw;
top: 50%;
right: 50%;
}
.circle8 {
width: 9vw;
height: 9vw;
bottom: 10%;
left: 60%;
}
</style>
</head>
<body>
<h1>Best and Affordable Destinations</h1>
<div id="destinations-list"></div>
<button id="back-button">Back to Home</button>
<script>
const destinations = [
{ name: "Santorini, Aegean Sea", price: "$300", rating: "4.2", imgSrc: "santorini-view.jpg" },
{ name: "Machu Picchu, Peru", price: "$450", rating: "4.5", imgSrc: "peru.jpg" },
{ name: "Grand Canyon, Arizona", price: "$400", rating: "4.7", imgSrc: "grandcanyon.jpg" },
{ name: "Bali, Indonesia", price: "$350", rating: "4.8", imgSrc: "bali.jpg" },
{ name: "Paris, France", price: "$500", rating: "4.6", imgSrc: "paris.jpg" },
{ name: "Kyoto, Japan", price: "$400", rating: "4.7", imgSrc: "japan.jpg" },
{ name: "Rome, Italy", price: "$450", rating: "4.5", imgSrc: "italy.jpg" },
{ name: "Sydney, Australia", price: "$480", rating: "4.6", imgSrc: "Sydney.jpg" },
{ name: "New York, USA", price: "$550", rating: "4.7", imgSrc: "usa.jpg" },
{ name: "Cape Town, South Africa", price: "$420", rating: "4.5", imgSrc: "capetown.jpg" },
{ name: "Barcelona, Spain", price: "$390", rating: "4.6", imgSrc: "spain.jpg" },
{ name: "Dubai, UAE", price: "$600", rating: "4.7", imgSrc: "dubai.jpg" }
// Add more destinations as needed
];
const destinationsList = document.getElementById("destinations-list");
destinations.forEach(destination => {
const destinationItem = document.createElement("div");
destinationItem.className = "destination-item";
destinationItem.innerHTML = `
<img src="${destination.imgSrc}" alt="${destination.name}">
<h2>${destination.name}</h2>
<p>Rating: <span class="rating">${destination.rating}</span></p>
<p class="price">From ${destination.price}</p>
<a href="payment.html"><button
class="book__now btn-style" style="box-shadow: 2px 2px 8px black;">Book
Now</button></a>
`;
destinationsList.appendChild(destinationItem);
});
document.getElementById("back-button").addEventListener("click", function() {
window.location.href = "index.html";
});
</script>
<div class="background-circles">
<div class="circle circle1"></div>
<div class="circle circle2"></div>
<div class="circle circle3"></div>
<div class="circle circle4"></div>
<div class="circle circle5"></div>
<div class="circle circle6"></div>
<div class="circle circle7"></div>
<div class="circle circle8"></div>
</div>
</body>
</html>