-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgal-annual.php
306 lines (279 loc) · 10.7 KB
/
gal-annual.php
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
<?php include "_libs/load.php" ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>St.Joseph's MHSS, Ondipudur</title>
<link rel="icon" href="/photos/logo-main.png" type="image/x-icon">
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fjalla+One&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<style>
.gal-annual {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.gal-annual-container {
position: relative;
min-height: 90vh;
background: #ddd;
}
.gal-annual-container h1 {
font-family: "Fjalla One", sans-serif !important;
font-size: 60px;
font-weight: bolder;
padding: 35px;
padding-top: 50px;
color: #2b4b8a;
text-align: center;
text-transform: capitalize;
}
.gal-annual-container .image-container {
display: flex;
flex-wrap: wrap;
gap: 15px;
justify-content: center;
padding: 10px;
}
.gal-annual-container .image-container .image {
height: 250px;
width: 350px;
border: 5px solid #2b4b8a;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
overflow: hidden;
cursor: pointer;
}
.gal-annual-container .image-container .image img {
height: 100%;
width: 100%;
object-fit: cover;
transition: 0.2s linear;
}
.gal-annual-container .image-container .image:hover img {
transform: scale(1.1);
}
.gal-annual-container .popup-image {
position: fixed;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.9);
height: 100%;
width: 100%;
z-index: 2000;
display: none;
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.gal-annual-container .popup-image span {
position: absolute;
top: 0;
right: 10px;
font-size: 60px;
font-weight: bolder;
color: #fff;
cursor: pointer;
z-index: 2000;
}
.gal-annual-container .popup-image span:hover {
color: #ffd700;
}
.gal-annual-container .btn-group {
margin-left: 20px;
}
.gal-annual-container .btn {
font-family: "LeagueSpartan", sans-serif !important;
background-color: #2b4b8a !important;
border: 2px solid #fff !important;
color: #fff !important;
text-decoration: none;
}
.gal-annual-container .btn:hover {
background-color: #ffd700 !important;
color: #333 !important;
}
.gal-annual-container .popup-image img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 5px solid #ffd700;
border-radius: 15px;
max-width: 90%; /* Adjusts the width for desktop view */
max-height: 90%; /* Adjusts the height for desktop view */
object-fit: contain;
animation: scaleIn 0.5s ease-in-out;
}
@keyframes scaleIn {
from {
transform: translate(-50%, -50%) scale(0.8);
}
to {
transform: translate(-50%, -50%) scale(1);
}
}
.gal-annual-container .navigation-buttons {
position: absolute;
top: 50%;
padding: 20px;
width: 100%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
z-index: 2000;
}
.gal-annual-container .navigation-buttons button {
background: none !important;
color: white;
border: none !important; /* Remove the border */
font-size: 60px;
padding: 10px 20px;
cursor: pointer;
}
.gal-annual-container .navigation-buttons button:hover {
color: #ffd700;
}
@media (max-width: 768px) {
.gal-annual-container .popup-image img {
max-width: 80%; /* Adjusts the width for mobile view */
max-height: 80%;
}
}
</style>
</head>
<body class="gal-annual">
<?php get_templates('preloader');?>
<?php get_templates('navbar');?>
<?php get_templates('scroll-up');?>
<div class="gal-annual-container">
<h1>annual Day</h1>
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio" id="btnradio2023" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="btnradio2023">2023</label>
<!-- <input type="radio" class="btn-check" name="btnradio" id="btnradio2022" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio2022">2022</label> -->
</div>
<div class="image-container">
<!-- 2023 images -->
<div class="image year-2023"><img id="image-0" src="/photos/annualday1.jpg" alt=""></div>
<div class="image year-2023"><img id="image-1" src="/photos/annualday2.jpg" alt=""></div>
<div class="image year-2023"><img id="image-2" src="/photos/annualday3.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday4.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday5.jpg" alt=""></div>
<div class="image year-2023"><img id="image-2" src="/photos/annualday6.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday7.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday8.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday9.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday10.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday11.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday12.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday13.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday14.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday15.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday16.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday17.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday18.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday19.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday20.jpg" alt=""></div>
<div class="image year-2023"><img id="image-3" src="/photos/annualday21.jpg" alt=""></div>
<!-- 2022 images
<div class="image year-2022"><img id="image-4" src="/photos/2.jpg" alt=""></div>
<div class="image year-2022"><img id="image-5" src="/photos/3.jpg" alt=""></div>
<div class="image year-2022"><img id="image-6" src="/photos/3.jpg" alt=""></div>
<div class="image year-2022"><img id="image-7" src="/photos/3.jpg" alt=""></div>
<div class="image year-2022"><img id="image-5" src="/photos/3.jpg" alt=""></div>
<div class="image year-2022"><img id="image-6" src="/photos/3.jpg" alt=""></div>
<div class="image year-2022"><img id="image-7" src="/photos/3.jpg" alt=""></div> -->
</div>
<div class="popup-image">
<span>×</span>
<img src="/photos/annualday1.jpg" alt="">
<div class="navigation-buttons">
<button class="prev"><</button>
<button class="next">></button>
</div>
</div>
</div>
<?php get_templates('footer');?>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
<script>
const images = document.querySelectorAll('.gal-annual-container .image-container img');
let currentImageIndex = 0;
images.forEach((image, index) => {
image.onclick = () => {
const popupImage = document.querySelector('.popup-image');
popupImage.style.display = 'flex';
document.querySelector('.popup-image img').src = image.getAttribute('src');
currentImageIndex = index;
setTimeout(() => {
popupImage.classList.add('visible');
}, 10); // Add a slight delay to ensure the display change is registered before adding the class
}
});
document.querySelector('.popup-image span').onclick = () => {
const popupImage = document.querySelector('.popup-image');
popupImage.classList.remove('visible');
setTimeout(() => {
popupImage.style.display = 'none';
}, 500); // Match this duration with your fadeOut animation duration
}
const updatePopupImage = () => {
document.querySelector('.popup-image img').src = images[currentImageIndex].getAttribute('src');
};
document.querySelector('.prev').onclick = () => {
currentImageIndex = (currentImageIndex - 1 + images.length) % images.length;
updatePopupImage();
};
document.querySelector('.next').onclick = () => {
currentImageIndex = (currentImageIndex + 1) % images.length;
updatePopupImage();
};
let startX;
document.querySelector('.popup-image img').addEventListener('touchstart', (e) => {
startX = e.touches[0].clientX;
});
document.querySelector('.popup-image img').addEventListener('touchmove', (e) => {
if (!startX) return;
const touch = e.touches[0];
const change = startX - touch.clientX;
if (change > 50) {
currentImageIndex = (currentImageIndex + 1) % images.length;
updatePopupImage();
startX = null;
} else if (change < -50) {
currentImageIndex = (currentImageIndex - 1 + images.length) % images.length;
updatePopupImage();
startX = null;
}
});
// Show/hide images based on the selected year
const radioButtons = document.querySelectorAll('input[name="btnradio"]');
const imageContainers = document.querySelectorAll('.image');
radioButtons.forEach(radio => {
radio.addEventListener('change', () => {
const selectedYear = radio.id.replace('btnradio', '');
imageContainers.forEach(container => {
if (container.classList.contains(`year-${selectedYear}`)) {
container.style.display = 'block';
} else {
container.style.display = 'none';
}
});
});
});
// Trigger change event to display initial set of images
document.querySelector('input[name="btnradio"]:checked').dispatchEvent(new Event('change'));
</script>
</body>
</html>