-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplace12.html
253 lines (231 loc) · 10.8 KB
/
place12.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="logo black.png" type="image/x-icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="place1styles.css">
</head>
<body>
<header>
<nav>
<a href="menu.html">Menu</a>
</nav>
</header>
<!-- carousel -->
<div class="carousel">
<!-- list item -->
<div class="list">
<div class="item">
<img src="https://static.toiimg.com/photo/38796013.cms">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">CHITRAKOTE</div>
<div class="topic">Chhattisgarh</div>
<div class="des">
Nestled in Chhattisgarh, Chitrakote Falls, the "Niagara of India," captivates with its 30-meter cascade, blending majestic beauty, rich history, architectural marvels, and profound Hindu spiritual significance.
</div>
<div class="buttons">
<a href="booking.html"><button>BOOK NOW</button></a>
<a href="destinations.html"><button>Destinations</button></a>
</div>
</div>
</div>
<div class="item">
<img src="https://www.fabhotels.com/blog/wp-content/uploads/2022/02/Chitrakoot-Waterfall-Jagdalpur-_1238019349-600X400.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">CHITRAKOTE</div>
<div class="topic">A Glimpse into History</div>
<div class="des">
Chitrakote Falls, tied to Ramayana legends, is a divine site visited by pilgrims. Its history, shaped by Chalukya and Nagavanshi dynasties, offers a rich cultural heritage for travelers.
</div>
<div class="buttons">
<a href="booking.html"><button>BOOK NOW</button></a>
<a href="destinations.html"><button>Destinations</button></a>
</div>
</div>
</div>
<div class="item">
<img src="https://media.istockphoto.com/id/1138359564/photo/the-chitrakote-falls-also-spelt-as-chitrakote-chitrakot-is-a-natural-waterfall-located-to-the.jpg?s=612x612&w=0&k=20&c=pUj_Z_hPr9SundZxpqAE2_b3FwZRD8aBoL7Hh6iwelc=">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">CHITRAKOTE</div>
<div class="topic">Architectural Splendour</div>
<div class="des">
Chitrakote Falls' semi-circular cascade, surrounded by lush greenery and rocky cliffs, enchants visitors. Nearby, the Dravidian-style Danteshwari Temple showcases intricate craftsmanship and devotion, adding cultural depth to the natural marvel.
</div>
<div class="buttons">
<a href="booking.html"><button class="bookings-button">BOOK NOW</button></a>
<a href="destinations.html"><button class="destinationsbutton">Destinations</button></a>
</div>
</div>
</div>
<div class="item">
<img src="https://static2.tripoto.com/media/filter/tst/img/267346/SpotDocument/1520403187_1494930391_chitrakot_waterfalls.jpg.webp">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">CHITRAKOTE</div>
<div class="topic">Cultural and Spiritual Significance</div>
<div class="des">
Chitrakote Falls, likened to the Ganges, purifies the soul with its sacred waters. The site blends Hindu and tribal rituals, fostering spiritual tranquility and cultural harmony.
</div>
<div class="buttons">
<a href="booking.html"><button>BOOK NOW</button></a>
<a href="destinations.html"><button>Destinations</button></a>
</div>
</div>
</div>
<div class="item">
<img src="https://www.adotrip.com/public/images/areas/master_images/60c3262b53a0b-Chitrakoot_waterfalls.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">CHITRAKOTE</div>
<div class="topic">Planning Your Visit?</div>
<div class="des">
Chitrakote Falls offers natural beauty and spiritual serenity, perfect for tranquil retreats, historical exploration, or spiritual journeys. Experience the divine spectacle and sacred tranquility, leaving an indelible mark on your soul.
</div>
<div class="buttons">
<a href="booking.html"><button>BOOK NOW</button></a>
<a href="destinations.html"><button>Destinations</button></a>
</div>
</div>
</div>
</div>
<!-- list thumbnail -->
<div class="thumbnail">
<div class="item">
<img src="https://static.toiimg.com/photo/38796013.cms">
<div class="content">
<div class="title">
Chitrakote Falls,Chhattisgarh
</div>
<div class="description">
Rajasthan
</div>
</div>
</div>
<div class="item">
<img src="https://www.fabhotels.com/blog/wp-content/uploads/2022/02/Chitrakoot-Waterfall-Jagdalpur-_1238019349-600X400.jpg">
<div class="content">
<div class="title">
Chitrakote Falls,Chhattisgarh
</div>
<div class="description">
A Glimpse into History
</div>
</div>
</div>
<div class="item">
<img src="https://media.istockphoto.com/id/1138359564/photo/the-chitrakote-falls-also-spelt-as-chitrakote-chitrakot-is-a-natural-waterfall-located-to-the.jpg?s=612x612&w=0&k=20&c=pUj_Z_hPr9SundZxpqAE2_b3FwZRD8aBoL7Hh6iwelc=">
<div class="content">
<div class="title">
Chitrakote Falls,Chhattisgarh
</div>
<div class="description">
Architectural Splendour
</div>
</div>
</div>
<div class="item">
<img src="https://static2.tripoto.com/media/filter/tst/img/267346/SpotDocument/1520403187_1494930391_chitrakot_waterfalls.jpg.webp">
<div class="content">
<div class="title">
Chitrakote Falls,Chhattisgarh
</div>
<div class="description">
Cultural and Spiritual Significance
</div>
</div>
</div>
<div class="item">
<img src="https://www.adotrip.com/public/images/areas/master_images/60c3262b53a0b-Chitrakoot_waterfalls.jpg">
<div class="content">
<div class="title">
Chitrakote Falls,Chhattisgarh
</div>
<div class="description">
Planning Your Visit
</div>
</div>
</div>
</div>
<!-- next prev -->
<div class="arrows">
<button id="prev"><</button>
<button id="next">></button>
</div>
<!-- time running -->
<div class="time"></div>
</div>
<script>
// Step 1: Get DOM elements
let nextDom = document.getElementById('next');
let prevDom = document.getElementById('prev');
let carouselDom = document.querySelector('.carousel');
let sliderDom = carouselDom.querySelector('.carousel .list');
let thumbnailBorderDom = document.querySelector('.carousel .thumbnail');
let thumbnailItemsDom = thumbnailBorderDom.querySelectorAll('.item');
let timeDom = document.querySelector('.carousel .time');
thumbnailBorderDom.appendChild(thumbnailItemsDom[0]);
let timeRunning = 4000; // Reduced time for faster transitions
let timeAutoNext = 5000; // Reduced time for faster auto next
nextDom.onclick = function() {
showSlider('next');
}
prevDom.onclick = function() {
showSlider('prev');
}
let runTimeOut;
let runNextAuto = setTimeout(() => {
nextDom.click();
}, timeAutoNext);
function showSlider(type) {
let sliderItemsDom = sliderDom.querySelectorAll('.carousel .list .item');
let thumbnailItemsDom = document.querySelectorAll('.carousel .thumbnail .item');
if (type === 'next') {
sliderDom.appendChild(sliderItemsDom[0]);
thumbnailBorderDom.appendChild(thumbnailItemsDom[0]);
carouselDom.classList.add('next');
} else {
sliderDom.prepend(sliderItemsDom[sliderItemsDom.length - 1]);
thumbnailBorderDom.prepend(thumbnailItemsDom[thumbnailItemsDom.length - 1]);
carouselDom.classList.add('prev');
}
clearTimeout(runTimeOut);
runTimeOut = setTimeout(() => {
carouselDom.classList.remove('next');
carouselDom.classList.remove('prev');
}, timeRunning);
clearTimeout(runNextAuto);
runNextAuto = setTimeout(() => {
nextDom.click();
}, timeAutoNext);
}
// Add click event listeners to thumbnail items for direct navigation
thumbnailItemsDom.forEach((thumbnail, index) => {
thumbnail.onclick = function() {
// Find the current index of the active thumbnail
let activeIndex = Array.from(thumbnailItemsDom).indexOf(thumbnailBorderDom.querySelector('.item'));
// Calculate the difference in indexes
let difference = index - activeIndex;
// If the clicked thumbnail is ahead of the active one
if (difference > 0) {
for (let i = 0; i < difference; i++) {
showSlider('next');
}
}
// If the clicked thumbnail is behind the active one
else if (difference < 0) {
for (let i = 0; i < Math.abs(difference); i++) {
showSlider('prev');
}
}
}
});
// Initial call to set the correct state
showSlider('next');
</script>
</body>
</html>