-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplace25.html
252 lines (231 loc) · 10.3 KB
/
place25.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
<!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://www.keralatourism.org/images/picture/large/Ponnani_Beach_2835.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">PONNANI</div>
<div class="topic">Kerala</div>
<div class="des">
Nestled on Kerala's Malabar Coast, Ponnani is an ancient port town rich in history, architectural beauty, and cultural traditions, blending its historic charm with modern vibrance in perfect 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://mir-s3-cdn-cf.behance.net/project_modules/1400/43561415107923.5628cfc42f23b.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">PONNANI</div>
<div class="topic">A Glimpse into History</div>
<div class="des">
Ponnani's history as a Chola dynasty port and center under the Zamorin rulers reflects its pivotal role in India-Arabia trade, cultural exchanges, and regional politics.
</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://visumexpresso.com/static/uploads/2022/07/01/db5b57ca189a1e01f0f20320e319f339.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">PONNANI</div>
<div class="topic">Architectural Splendour</div>
<div class="des">
Ponnani's rich heritage is evident in its stunning temples and mosques, notably the 16th-century Ponnani Juma Masjid and the Thirunavaya Navamukunda Temple, both showcasing exquisite traditional Kerala architecture.
</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://live.staticflickr.com/1200/707342848_40f814ddc6_b.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">PONNANI</div>
<div class="topic">Cultural and Spiritual Significance</div>
<div class="des">
Ponnani's Navamukunda Temple and festival, along with the Ramzan celebration, showcase its rich spiritual and cultural heritage, reflecting a harmonious blend of Hindu and Muslim traditions in vibrant ceremonies.
</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://keralatourism.travel/images/destinations/headers/kochi-kerala-tourism-entry-fee-timings-holidays-reviews-header.jpg">
<div class="content">
<div class="author">BHARAT-The Hidden Gem of India</div>
<div class="title">PONNANI</div>
<div class="topic">Planning Your Visit?</div>
<div class="des">
Ponnani embodies Kerala's rich heritage with its historical depth, architectural splendor, and vibrant festivals, offering a journey through time, culture, and spirituality that resonates deeply with both heart and 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://www.keralatourism.org/images/picture/large/Ponnani_Beach_2835.jpg">
<div class="content">
<div class="title">
Ponnani,Kerala
</div>
<div class="description">
Kerala
</div>
</div>
</div>
<div class="item">
<img src="https://mir-s3-cdn-cf.behance.net/project_modules/1400/43561415107923.5628cfc42f23b.jpg">
<div class="content">
<div class="title">
Ponnani,Kerala
</div>
<div class="description">
A Glimpse into History
</div>
</div>
</div>
<div class="item">
<img src="https://visumexpresso.com/static/uploads/2022/07/01/db5b57ca189a1e01f0f20320e319f339.jpg">
<div class="content">
<div class="title">
Ponnani,Kerala
</div>
<div class="description">
Architectural Splendour
</div>
</div>
</div>
<div class="item">
<img src="https://live.staticflickr.com/1200/707342848_40f814ddc6_b.jpg">
<div class="content">
<div class="title">
Ponnani,Kerala
</div>
<div class="description">
Cultural and Spiritual Significance
</div>
</div>
</div>
<div class="item">
<img src="https://keralatourism.travel/images/destinations/headers/kochi-kerala-tourism-entry-fee-timings-holidays-reviews-header.jpg">
<div class="content">
<div class="title">
Ponnani,Kerala
</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>