Koperization commited on
Commit
a5dca31
·
verified ·
1 Parent(s): 5f722b2

Page Title: Junior B Boys – Volleyball

Browse files

Design Style:
- Theme: Dark mode (#121212)
- Accent Color: #008080 (teal)
- Text Color: White (#FFFFFF)/Light Grey (#CCCCCC)
- Font: Montserrat
- Animations: Smooth transitions and carousel effects

Header:
- Existing NAGAS header

Layout:
1. Back Button (→ /volleyball)
2. Search Bar (filters players by name)
3. Player Grid:
- 3-column responsive grid (2-col tablet, 1-col mobile)
- Cards with hover animations (scale + glow)
- Staggered fade-in on load

4. Player Profile Modal:
- Slide-up animation
- Carousel gallery with:
* Main image display
* Thumbnail navigation
* Smooth transition between images
* Swipe support for mobile

CSS Additions:
/* Carousel Container */
.carousel-container {
position: relative;
max-width: 100%;
margin: 20px auto;
overflow: hidden;
border-radius: 6px;
}

/* Main Image */
.carousel-main {
width: 100%;
height: 300px;
background: #1E1E1E;
border-radius: 6px;
overflow: hidden;
position: relative;
}
.carousel-main img {
width: 100%;
height: 100%;
object-fit: cover;
transition: opacity 0.5s ease;
}

/* Thumbnails */
.carousel-thumbs {
display: flex;
gap: 8px;
margin-top: 10px;
justify-content: center;
}
.carousel-thumbs img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 4px;
cursor: pointer;
opacity: 0.7;
transition: all 0.3s;
}
.carousel-thumbs img.active {
opacity: 1;
border: 2px solid #008080;
}

/* Navigation Arrows */
.carousel-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,0.5);
color: white;
border: none;
padding: 10px;
cursor: pointer;
font-size: 18px;
z-index: 10;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.carousel-arrow:hover {
background: #008080;
}
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

/* Animation for image transition */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

/* JavaScript for Carousel */
<script>
document.querySelectorAll('.player-card').forEach(card => {
card.addEventListener('click', () => {
const modal = document.getElementById('profile-modal');
const mainImg = modal.querySelector('.carousel-main img');
const thumbs = modal.querySelectorAll('.carousel-thumbs img');
let currentIndex = 0;

// Set up carousel
thumbs.forEach((thumb, index) => {
thumb.addEventListener('click', () => {
currentIndex = index;
updateCarousel();
});
});

// Navigation arrows
modal.querySelector('.carousel-arrow.prev').addEventListener('click', () => {
currentIndex = (currentIndex > 0) ? currentIndex - 1 : thumbs.length - 1;
updateCarousel();
});

modal.querySelector('.carousel-arrow.next').addEventListener('click', () => {
currentIndex = (currentIndex < thumbs.length - 1) ? currentIndex + 1 : 0;
updateCarousel();
});

// Swipe support for mobile
let touchStartX = 0;
mainImg.addEventListener('touchstart', (e) => {
touchStartX = e.changedTouches[0].screenX;
});

mainImg.addEventListener('touchend', (e) => {
const touchEndX = e.changedTouches[0].screenX;
if (touchStartX - touchEndX > 50) { // Swipe left
currentIndex = (currentIndex < thumbs.length - 1) ? currentIndex + 1 : 0;
} else if (touchEndX - touchStartX > 50) { // Swipe right
currentIndex = (currentIndex > 0) ? currentIndex - 1 : thumbs.length - 1;
}
updateCarousel();
});

function updateCarousel() {
// Fade out current image
mainImg.style.opacity = 0;

setTimeout(() => {
// Update main image
mainImg.src = thumbs[currentIndex].src;
mainImg.style.opacity = 1;

// Update active thumbnail
thumbs.forEach((thumb, index) => {
thumb.classList.toggle('active', index === currentIndex);
});
}, 300);
}

// Initialize
updateCarousel();
});
});
</script>

HTML Structure for Carousel:
<div class="carousel-container">
<div class="carousel-main">
<img src="player-main.jpg" alt="Main photo">
<button class="carousel-arrow prev">‹</button>
<button class="carousel-arrow next">›</button>
</div>
<div class="carousel-thumbs">
<img src="player-1.jpg" class="active" alt="Thumbnail 1">
<img src="player-2.jpg" alt="Thumbnail 2">
<img src="player-3.jpg" alt="Thumbnail 3">
</div>
</div>

Files changed (2) hide show
  1. junior-b-boys.html +535 -0
  2. volleyball.html +2 -2
junior-b-boys.html ADDED
@@ -0,0 +1,535 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Junior B Boys – Volleyball</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script>
11
+ tailwind.config = {
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ primary: '#008080',
16
+ dark: '#121212',
17
+ darker: '#0a0a0a',
18
+ lightGrey: '#CCCCCC'
19
+ }
20
+ }
21
+ }
22
+ }
23
+ </script>
24
+ <style>
25
+ body {
26
+ font-family: 'Montserrat', sans-serif;
27
+ background-color: #121212;
28
+ color: #ffffff;
29
+ }
30
+ h1, h2, h3, h4, h5, h6 {
31
+ font-weight: 700;
32
+ }
33
+ /* Shared card styles */
34
+ .player-card {
35
+ transition: all 0.3s ease;
36
+ border: 1px solid #008080;
37
+ border-radius: 6px;
38
+ background-color: #1E1E1E;
39
+ padding: 20px;
40
+ text-align: center;
41
+ color: white;
42
+ opacity: 0;
43
+ transform: translateY(20px);
44
+ }
45
+
46
+ /* Hover effects */
47
+ .player-card:hover {
48
+ transform: translateY(-5px) scale(1.03);
49
+ box-shadow: 0 6px 12px rgba(0, 128, 128, 0.3);
50
+ }
51
+
52
+ /* Section titles */
53
+ .section-title {
54
+ margin-bottom: 20px;
55
+ }
56
+
57
+ /* Preserve existing header/footer styles */
58
+ header, footer {
59
+ width: 100%;
60
+ padding: 20px;
61
+ }
62
+
63
+ /* Carousel Container */
64
+ .carousel-container {
65
+ position: relative;
66
+ max-width: 100%;
67
+ margin: 20px auto;
68
+ overflow: hidden;
69
+ border-radius: 6px;
70
+ }
71
+
72
+ /* Main Image */
73
+ .carousel-main {
74
+ width: 100%;
75
+ height: 300px;
76
+ background: #1E1E1E;
77
+ border-radius: 6px;
78
+ overflow: hidden;
79
+ position: relative;
80
+ }
81
+ .carousel-main img {
82
+ width: 100%;
83
+ height: 100%;
84
+ object-fit: cover;
85
+ transition: opacity 0.5s ease;
86
+ }
87
+
88
+ /* Thumbnails */
89
+ .carousel-thumbs {
90
+ display: flex;
91
+ gap: 8px;
92
+ margin-top: 10px;
93
+ justify-content: center;
94
+ }
95
+ .carousel-thumbs img {
96
+ width: 60px;
97
+ height: 60px;
98
+ object-fit: cover;
99
+ border-radius: 4px;
100
+ cursor: pointer;
101
+ opacity: 0.7;
102
+ transition: all 0.3s;
103
+ }
104
+ .carousel-thumbs img.active {
105
+ opacity: 1;
106
+ border: 2px solid #008080;
107
+ }
108
+
109
+ /* Navigation Arrows */
110
+ .carousel-arrow {
111
+ position: absolute;
112
+ top: 50%;
113
+ transform: translateY(-50%);
114
+ background: rgba(0,0,0,0.5);
115
+ color: white;
116
+ border: none;
117
+ padding: 10px;
118
+ cursor: pointer;
119
+ font-size: 18px;
120
+ z-index: 10;
121
+ border-radius: 50%;
122
+ width: 40px;
123
+ height: 40px;
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ }
128
+ .carousel-arrow:hover {
129
+ background: #008080;
130
+ }
131
+ .carousel-arrow.prev { left: 10px; }
132
+ .carousel-arrow.next { right: 10px; }
133
+
134
+ /* Animation for image transition */
135
+ @keyframes fadeIn {
136
+ from { opacity: 0; }
137
+ to { opacity: 1; }
138
+ }
139
+
140
+ /* Modal */
141
+ .modal {
142
+ position: fixed;
143
+ top: 0;
144
+ left: 0;
145
+ width: 100%;
146
+ height: 100%;
147
+ background: rgba(0, 0, 0, 0.8);
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ z-index: 1000;
152
+ opacity: 0;
153
+ visibility: hidden;
154
+ transition: all 0.3s ease;
155
+ }
156
+ .modal.active {
157
+ opacity: 1;
158
+ visibility: visible;
159
+ }
160
+ .modal-content {
161
+ background: #1E1E1E;
162
+ border-radius: 8px;
163
+ width: 90%;
164
+ max-width: 600px;
165
+ padding: 20px;
166
+ transform: translateY(20px);
167
+ transition: transform 0.3s ease;
168
+ }
169
+ .modal.active .modal-content {
170
+ transform: translateY(0);
171
+ }
172
+ </style>
173
+ </head>
174
+ <body class="bg-dark text-white">
175
+ <!-- Navigation -->
176
+ <header class="fixed w-full z-50 bg-dark border-b border-primary">
177
+ <div class="container mx-auto px-4 py-3 flex justify-between items-center">
178
+ <div class="flex items-center">
179
+ <div class="w-10 h-10 bg-primary rounded-full mr-3"></div>
180
+ <a href="index.html" class="text-xl font-extrabold"><span class="text-[#008080]">NAGAS</span><span class="text-white">ATHLETICS</span></a>
181
+ </div>
182
+ <nav class="hidden md:flex space-x-6">
183
+ <a href="index.html" class="hover:text-primary">Home</a>
184
+ <a href="about.html" class="hover:text-primary">About</a>
185
+ <a href="teams.html" class="hover:text-primary">Teams</a>
186
+ <a href="schedule.html" class="hover:text-primary">Schedule</a>
187
+ <a href="council.html" class="hover:text-primary">Council</a>
188
+ <a href="news.html" class="hover:text-primary">News</a>
189
+ <a href="get-involved.html" class="hover:text-primary">Get Involved</a>
190
+ </nav>
191
+ <button id="menu-toggle" class="md:hidden text-white">
192
+ <i data-feather="menu"></i>
193
+ </button>
194
+ </div>
195
+ </header>
196
+
197
+ <!-- Mobile Menu -->
198
+ <div id="mobile-menu" class="fixed inset-0 bg-dark z-50 hidden">
199
+ <div class="flex justify-between items-center p-4 border-b border-primary">
200
+ <div class="flex items-center">
201
+ <div class="w-10 h-10 bg-primary rounded-full mr-3"></div>
202
+ <span class="text-xl font-extrabold"><span class="text-[#008080]">NAGAS</span><span class="text-white">ATHLETICS</span></span>
203
+ </div>
204
+ <button id="menu-close" class="text-white">
205
+ <i data-feather="x"></i>
206
+ </button>
207
+ </div>
208
+ <nav class="p-4">
209
+ <a href="index.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">Home</a>
210
+ <a href="about.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">About</a>
211
+ <a href="teams.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">Teams</a>
212
+ <a href="schedule.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">Schedule</a>
213
+ <a href="council.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">Council</a>
214
+ <a href="news.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">News</a>
215
+ <a href="get-involved.html" class="block py-3 hover:text-primary border-b border-[#2e2e2e]">Get Involved</a>
216
+ </nav>
217
+ </div>
218
+
219
+ <!-- Breadcrumb -->
220
+ <div class="pt-20 pb-4 bg-darker border-b border-[#2e2e2e]">
221
+ <div class="container mx-auto px-4">
222
+ <nav class="text-sm">
223
+ <a href="index.html" class="text-primary hover:underline">Home</a> >
224
+ <a href="teams.html" class="text-primary hover:underline">Teams</a> >
225
+ <a href="volleyball.html" class="text-primary hover:underline">Volleyball</a> >
226
+ <span class="text-white">Junior B Boys</span>
227
+ </nav>
228
+ </div>
229
+ </div>
230
+
231
+ <!-- Back Button -->
232
+ <div class="container mx-auto px-4 py-6">
233
+ <a href="volleyball.html" class="inline-flex items-center text-primary hover:text-lightGrey">
234
+ <i data-feather="arrow-left" class="mr-2"></i> Back to Volleyball Teams
235
+ </a>
236
+ </div>
237
+
238
+ <!-- Search Bar -->
239
+ <div class="container mx-auto px-4 py-6">
240
+ <input type="text" id="search-bar" placeholder="Search players..." class="w-full p-3 rounded bg-[#1E1E1E] border border-[#008080] text-white focus:outline-none focus:ring-2 focus:ring-[#008080]">
241
+ </div>
242
+
243
+ <!-- Player Grid -->
244
+ <section class="py-16 px-4">
245
+ <div class="container mx-auto">
246
+ <h2 class="text-3xl md:text-4xl font-bold text-center mb-4 section-title">Junior B Boys Roster</h2>
247
+ <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6" id="player-grid">
248
+ <!-- Player cards will be populated by JavaScript -->
249
+ </div>
250
+ </div>
251
+ </section>
252
+
253
+ <!-- Player Profile Modal -->
254
+ <div id="profile-modal" class="modal">
255
+ <div class="modal-content">
256
+ <div class="flex justify-between items-center mb-4">
257
+ <h3 id="modal-player-name" class="text-2xl font-bold"></h3>
258
+ <button id="close-modal" class="text-white text-2xl">&times;</button>
259
+ </div>
260
+ <div class="carousel-container">
261
+ <div class="carousel-main">
262
+ <img id="carousel-main-img" src="" alt="Main photo">
263
+ <button class="carousel-arrow prev">‹</button>
264
+ <button class="carousel-arrow next">›</button>
265
+ </div>
266
+ <div class="carousel-thumbs" id="carousel-thumbs">
267
+ <!-- Thumbnails will be populated by JavaScript -->
268
+ </div>
269
+ </div>
270
+ <div class="mt-4">
271
+ <p id="modal-player-position" class="text-primary"></p>
272
+ <p id="modal-player-bio" class="text-lightGrey mt-2"></p>
273
+ </div>
274
+ </div>
275
+ </div>
276
+
277
+ <!-- Footer -->
278
+ <footer class="bg-darker py-12 border-t border-[#2e2e2e]">
279
+ <div class="container mx-auto px-4">
280
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
281
+ <div>
282
+ <h3 class="text-xl font-bold mb-4">Contact Info</h3>
283
+ <p>Northbridge International School Cambodia</p>
284
+ <p>#98C, Street 169, Phnom Penh</p>
285
+ <p>Email: info@nagas.edu.kh</p>
286
+ <p>Phone: +855 12 345 678</p>
287
+ </div>
288
+ <div>
289
+ <h3 class="text-xl font-bold mb-4">Follow Us</h3>
290
+ <div class="flex space-x-4">
291
+ <a href="#" class="text-primary hover:text-lightGrey">
292
+ <i data-feather="facebook"></i>
293
+ </a>
294
+ <a href="#" class="text-primary hover:text-lightGrey">
295
+ <i data-feather="instagram"></i>
296
+ </a>
297
+ </div>
298
+ <p class="mt-2">@NAGAS_NISC</p>
299
+ </div>
300
+ <div>
301
+ <h3 class="text-xl font-bold mb-4">Quick Links</h3>
302
+ <ul class="space-y-2">
303
+ <li><a href="teams.html" class="hover:text-primary">Teams</a></li>
304
+ <li><a href="schedule.html" class="hover:text-primary">Schedule</a></li>
305
+ <li><a href="news.html" class="hover:text-primary">News</a></li>
306
+ <li><a href="#" class="hover:text-primary">Athlete Portal</a></li>
307
+ </ul>
308
+ </div>
309
+ </div>
310
+ <div class="border-t border-[#2e2e2e] mt-8 pt-8 text-center">
311
+ <p>&copy; 2023 NAGAS - Northbridge Athletic Groups and Sports. All rights reserved.</p>
312
+ </div>
313
+ </div>
314
+ </footer>
315
+
316
+ <script>
317
+ feather.replace();
318
+
319
+ // Mobile menu toggle
320
+ document.getElementById('menu-toggle').addEventListener('click', function() {
321
+ document.getElementById('mobile-menu').classList.remove('hidden');
322
+ });
323
+
324
+ document.getElementById('menu-close').addEventListener('click', function() {
325
+ document.getElementById('mobile-menu').classList.add('hidden');
326
+ });
327
+
328
+ // Player data
329
+ const players = [
330
+ {
331
+ id: 1,
332
+ name: "Alex Morgan",
333
+ position: "Setter",
334
+ bio: "Alex is a skilled setter with excellent court vision and leadership qualities. He has been with the team for 2 years and consistently improves his technique.",
335
+ images: [
336
+ "http://static.photos/people/320x240/1",
337
+ "http://static.photos/sport/320x240/2",
338
+ "http://static.photos/education/320x240/3"
339
+ ]
340
+ },
341
+ {
342
+ id: 2,
343
+ name: "James Wilson",
344
+ position: "Outside Hitter",
345
+ bio: "James brings powerful spikes and strong defensive skills to the team. His energy and determination inspire teammates on the court.",
346
+ images: [
347
+ "http://static.photos/people/320x240/4",
348
+ "http://static.photos/sport/320x240/5",
349
+ "http://static.photos/education/320x240/6"
350
+ ]
351
+ },
352
+ {
353
+ id: 3,
354
+ name: "Michael Chen",
355
+ position: "Middle Blocker",
356
+ bio: "Michael's height and blocking ability make him a formidable presence at the net. He's also known for his quick reflexes and teamwork.",
357
+ images: [
358
+ "http://static.photos/people/320x240/7",
359
+ "http://static.photos/sport/320x240/8",
360
+ "http://static.photos/education/320x240/9"
361
+ ]
362
+ },
363
+ {
364
+ id: 4,
365
+ name: "David Rodriguez",
366
+ position: "Libero",
367
+ bio: "David's defensive skills and quick movements make him an excellent libero. He's always ready to make spectacular saves.",
368
+ images: [
369
+ "http://static.photos/people/320x240/10",
370
+ "http://static.photos/sport/320x240/11",
371
+ "http://static.photos/education/320x240/12"
372
+ ]
373
+ },
374
+ {
375
+ id: 5,
376
+ name: "Robert Johnson",
377
+ position: "Opposite Hitter",
378
+ bio: "Robert's versatility and powerful attacks from the back row make him a valuable asset to the team.",
379
+ images: [
380
+ "http://static.photos/people/320x240/13",
381
+ "http://static.photos/sport/320x240/14",
382
+ "http://static.photos/education/320x240/15"
383
+ ]
384
+ },
385
+ {
386
+ id: 6,
387
+ name: "Thomas Kim",
388
+ position: "Outside Hitter",
389
+ bio: "Thomas combines athleticism with technical skill, making him a consistent scorer for the team.",
390
+ images: [
391
+ "http://static.photos/people/320x240/16",
392
+ "http://static.photos/sport/320x240/17",
393
+ "http://static.photos/education/320x240/18"
394
+ ]
395
+ }
396
+ ];
397
+
398
+ // Render player cards
399
+ function renderPlayers(playerList) {
400
+ const grid = document.getElementById('player-grid');
401
+ grid.innerHTML = '';
402
+
403
+ playerList.forEach((player, index) => {
404
+ const card = document.createElement('div');
405
+ card.className = 'player-card';
406
+ card.innerHTML = `
407
+ <img src="${player.images[0]}" alt="${player.name}" class="w-full h-48 object-cover rounded mb-4">
408
+ <h3 class="text-xl font-bold">${player.name}</h3>
409
+ <p class="text-primary">${player.position}</p>
410
+ `;
411
+
412
+ // Add staggered animation
413
+ setTimeout(() => {
414
+ card.style.opacity = '1';
415
+ card.style.transform = 'translateY(0)';
416
+ }, index * 100);
417
+
418
+ card.addEventListener('click', () => openModal(player));
419
+ grid.appendChild(card);
420
+ });
421
+ }
422
+
423
+ // Search functionality
424
+ document.getElementById('search-bar').addEventListener('input', function(e) {
425
+ const searchTerm = e.target.value.toLowerCase();
426
+ const filteredPlayers = players.filter(player =>
427
+ player.name.toLowerCase().includes(searchTerm)
428
+ );
429
+ renderPlayers(filteredPlayers);
430
+ });
431
+
432
+ // Modal functionality
433
+ const modal = document.getElementById('profile-modal');
434
+ const closeModalBtn = document.getElementById('close-modal');
435
+
436
+ function openModal(player) {
437
+ document.getElementById('modal-player-name').textContent = player.name;
438
+ document.getElementById('modal-player-position').textContent = player.position;
439
+ document.getElementById('modal-player-bio').textContent = player.bio;
440
+
441
+ // Set main image
442
+ document.getElementById('carousel-main-img').src = player.images[0];
443
+
444
+ // Set thumbnails
445
+ const thumbsContainer = document.getElementById('carousel-thumbs');
446
+ thumbsContainer.innerHTML = '';
447
+ player.images.forEach((img, index) => {
448
+ const thumb = document.createElement('img');
449
+ thumb.src = img;
450
+ thumb.alt = `Thumbnail ${index + 1}`;
451
+ if (index === 0) thumb.classList.add('active');
452
+ thumb.addEventListener('click', () => updateCarousel(player.images, index));
453
+ thumbsContainer.appendChild(thumb);
454
+ });
455
+
456
+ modal.classList.add('active');
457
+ document.body.style.overflow = 'hidden';
458
+ }
459
+
460
+ function closeModal() {
461
+ modal.classList.remove('active');
462
+ document.body.style.overflow = 'auto';
463
+ }
464
+
465
+ closeModalBtn.addEventListener('click', closeModal);
466
+ modal.addEventListener('click', (e) => {
467
+ if (e.target === modal) closeModal();
468
+ });
469
+
470
+ // Carousel functionality
471
+ function updateCarousel(images, currentIndex) {
472
+ const mainImg = document.getElementById('carousel-main-img');
473
+ const thumbs = document.querySelectorAll('.carousel-thumbs img');
474
+
475
+ // Fade out current image
476
+ mainImg.style.opacity = 0;
477
+
478
+ setTimeout(() => {
479
+ // Update main image
480
+ mainImg.src = images[currentIndex];
481
+ mainImg.style.opacity = 1;
482
+
483
+ // Update active thumbnail
484
+ thumbs.forEach((thumb, index) => {
485
+ thumb.classList.toggle('active', index === currentIndex);
486
+ });
487
+ }, 300);
488
+ }
489
+
490
+ // Carousel navigation
491
+ document.querySelector('.carousel-arrow.prev').addEventListener('click', () => {
492
+ const thumbs = document.querySelectorAll('.carousel-thumbs img');
493
+ let currentIndex = Array.from(thumbs).findIndex(thumb => thumb.classList.contains('active'));
494
+ const images = Array.from(thumbs).map(thumb => thumb.src);
495
+
496
+ currentIndex = (currentIndex > 0) ? currentIndex - 1 : thumbs.length - 1;
497
+ updateCarousel(images, currentIndex);
498
+ });
499
+
500
+ document.querySelector('.carousel-arrow.next').addEventListener('click', () => {
501
+ const thumbs = document.querySelectorAll('.carousel-thumbs img');
502
+ let currentIndex = Array.from(thumbs).findIndex(thumb => thumb.classList.contains('active'));
503
+ const images = Array.from(thumbs).map(thumb => thumb.src);
504
+
505
+ currentIndex = (currentIndex < thumbs.length - 1) ? currentIndex + 1 : 0;
506
+ updateCarousel(images, currentIndex);
507
+ });
508
+
509
+ // Swipe support for mobile
510
+ let touchStartX = 0;
511
+ const mainImg = document.getElementById('carousel-main-img');
512
+
513
+ mainImg.addEventListener('touchstart', (e) => {
514
+ touchStartX = e.changedTouches[0].screenX;
515
+ });
516
+
517
+ mainImg.addEventListener('touchend', (e) => {
518
+ const touchEndX = e.changedTouches[0].screenX;
519
+ const thumbs = document.querySelectorAll('.carousel-thumbs img');
520
+ let currentIndex = Array.from(thumbs).findIndex(thumb => thumb.classList.contains('active'));
521
+ const images = Array.from(thumbs).map(thumb => thumb.src);
522
+
523
+ if (touchStartX - touchEndX > 50) { // Swipe left
524
+ currentIndex = (currentIndex < thumbs.length - 1) ? currentIndex + 1 : 0;
525
+ } else if (touchEndX - touchStartX > 50) { // Swipe right
526
+ currentIndex = (currentIndex > 0) ? currentIndex - 1 : thumbs.length - 1;
527
+ }
528
+ updateCarousel(images, currentIndex);
529
+ });
530
+
531
+ // Initialize
532
+ renderPlayers(players);
533
+ </script>
534
+ </body>
535
+ </html>
volleyball.html CHANGED
@@ -166,7 +166,7 @@
166
  </svg>
167
  <h3 class="text-xl font-bold">Junior A Boys</h3>
168
  </a>
169
- <a href="#" class="team-tile block">
170
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-4">
171
  <path d="M12 2L2 7l10 5 10-5-10-5z"></path>
172
  <path d="M2 17l10 5 10-5"></path>
@@ -174,7 +174,7 @@
174
  </svg>
175
  <h3 class="text-xl font-bold">Junior B Boys</h3>
176
  </a>
177
- <a href="#" class="team-tile block">
178
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-4">
179
  <path d="M12 2L2 7l10 5 10-5-10-5z"></path>
180
  <path d="M2 17l10 5 10-5"></path>
 
166
  </svg>
167
  <h3 class="text-xl font-bold">Junior A Boys</h3>
168
  </a>
169
+ <a href="junior-b-boys.html" class="team-tile block">
170
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-4">
171
  <path d="M12 2L2 7l10 5 10-5-10-5z"></path>
172
  <path d="M2 17l10 5 10-5"></path>
 
174
  </svg>
175
  <h3 class="text-xl font-bold">Junior B Boys</h3>
176
  </a>
177
+ <a href="#" class="team-tile block">
178
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-4">
179
  <path d="M12 2L2 7l10 5 10-5-10-5z"></path>
180
  <path d="M2 17l10 5 10-5"></path>