Spaces:
Running
Running
Créer moi une page qui affiche les galeries photos et les photos de nos événements. - Initial Deployment
Browse files- README.md +7 -5
- index.html +416 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: arc-galeries
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: gray
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,416 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="fr">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Galerie Photo - Nos Événements</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gallery-item {
|
11 |
+
transition: all 0.3s ease;
|
12 |
+
}
|
13 |
+
.gallery-item:hover {
|
14 |
+
transform: scale(1.03);
|
15 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
|
16 |
+
}
|
17 |
+
.filter-btn.active {
|
18 |
+
background-color: #3b82f6;
|
19 |
+
color: white;
|
20 |
+
}
|
21 |
+
.modal {
|
22 |
+
transition: opacity 0.3s ease;
|
23 |
+
}
|
24 |
+
.modal-content {
|
25 |
+
max-height: 90vh;
|
26 |
+
}
|
27 |
+
</style>
|
28 |
+
</head>
|
29 |
+
<body class="bg-gray-50 font-sans">
|
30 |
+
<!-- Header -->
|
31 |
+
<header class="bg-white shadow-sm">
|
32 |
+
<div class="container mx-auto px-4 py-6">
|
33 |
+
<h1 class="text-3xl md:text-4xl font-bold text-center text-blue-600">Galerie Photo de Nos Événements</h1>
|
34 |
+
<p class="text-center text-gray-600 mt-2">Revivez les moments forts de nos événements passés</p>
|
35 |
+
</div>
|
36 |
+
</header>
|
37 |
+
|
38 |
+
<!-- Main Content -->
|
39 |
+
<main class="container mx-auto px-4 py-8">
|
40 |
+
<!-- Filter Buttons -->
|
41 |
+
<div class="flex flex-wrap justify-center gap-2 mb-8">
|
42 |
+
<button class="filter-btn active px-4 py-2 rounded-full bg-gray-200 text-gray-800 hover:bg-blue-100 transition" data-filter="all">
|
43 |
+
<i class="fas fa-layer-group mr-2"></i>Tous
|
44 |
+
</button>
|
45 |
+
<button class="filter-btn px-4 py-2 rounded-full bg-gray-200 text-gray-800 hover:bg-blue-100 transition" data-filter="mariage">
|
46 |
+
<i class="fas fa-ring mr-2"></i>Mariages
|
47 |
+
</button>
|
48 |
+
<button class="filter-btn px-4 py-2 rounded-full bg-gray-200 text-gray-800 hover:bg-blue-100 transition" data-filter="anniversaire">
|
49 |
+
<i class="fas fa-birthday-cake mr-2"></i>Anniversaires
|
50 |
+
</button>
|
51 |
+
<button class="filter-btn px-4 py-2 rounded-full bg-gray-200 text-gray-800 hover:bg-blue-100 transition" data-filter="entreprise">
|
52 |
+
<i class="fas fa-briefcase mr-2"></i>Événements d'entreprise
|
53 |
+
</button>
|
54 |
+
<button class="filter-btn px-4 py-2 rounded-full bg-gray-200 text-gray-800 hover:bg-blue-100 transition" data-filter="culturel">
|
55 |
+
<i class="fas fa-theater-masks mr-2"></i>Événements culturels
|
56 |
+
</button>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<!-- Gallery Grid -->
|
60 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" id="gallery-grid">
|
61 |
+
<!-- Gallery items will be inserted here by JavaScript -->
|
62 |
+
</div>
|
63 |
+
|
64 |
+
<!-- Load More Button -->
|
65 |
+
<div class="text-center mt-10">
|
66 |
+
<button id="load-more" class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition shadow-md">
|
67 |
+
<i class="fas fa-plus-circle mr-2"></i>Charger plus de photos
|
68 |
+
</button>
|
69 |
+
</div>
|
70 |
+
</main>
|
71 |
+
|
72 |
+
<!-- Image Modal -->
|
73 |
+
<div id="image-modal" class="modal fixed inset-0 bg-black bg-opacity-80 z-50 flex items-center justify-center hidden">
|
74 |
+
<div class="modal-content bg-white rounded-lg overflow-hidden max-w-4xl w-full mx-4">
|
75 |
+
<div class="flex justify-between items-center bg-gray-100 px-4 py-2">
|
76 |
+
<h3 class="text-lg font-semibold" id="modal-title">Titre de l'image</h3>
|
77 |
+
<button id="close-modal" class="text-gray-600 hover:text-gray-900">
|
78 |
+
<i class="fas fa-times text-2xl"></i>
|
79 |
+
</button>
|
80 |
+
</div>
|
81 |
+
<div class="p-4">
|
82 |
+
<img id="modal-image" src="" alt="" class="w-full h-auto max-h-[70vh] object-contain">
|
83 |
+
<p id="modal-description" class="text-gray-700 mt-4"></p>
|
84 |
+
<div class="flex justify-between items-center mt-4">
|
85 |
+
<button id="prev-btn" class="px-4 py-2 bg-gray-200 rounded hover:bg-gray-300">
|
86 |
+
<i class="fas fa-chevron-left mr-2"></i>Précédent
|
87 |
+
</button>
|
88 |
+
<button id="next-btn" class="px-4 py-2 bg-gray-200 rounded hover:bg-gray-300">
|
89 |
+
Suivant<i class="fas fa-chevron-right ml-2"></i>
|
90 |
+
</button>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<!-- Footer -->
|
97 |
+
<footer class="bg-gray-800 text-white py-8 mt-12">
|
98 |
+
<div class="container mx-auto px-4">
|
99 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
100 |
+
<div class="mb-4 md:mb-0">
|
101 |
+
<h2 class="text-xl font-bold">Notre Galerie Photo</h2>
|
102 |
+
<p class="text-gray-400">Capturant vos moments précieux depuis 2010</p>
|
103 |
+
</div>
|
104 |
+
<div class="flex space-x-4">
|
105 |
+
<a href="#" class="text-gray-400 hover:text-white transition">
|
106 |
+
<i class="fab fa-facebook-f text-xl"></i>
|
107 |
+
</a>
|
108 |
+
<a href="#" class="text-gray-400 hover:text-white transition">
|
109 |
+
<i class="fab fa-instagram text-xl"></i>
|
110 |
+
</a>
|
111 |
+
<a href="#" class="text-gray-400 hover:text-white transition">
|
112 |
+
<i class="fab fa-pinterest-p text-xl"></i>
|
113 |
+
</a>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<div class="border-t border-gray-700 mt-6 pt-6 text-center text-gray-400">
|
117 |
+
<p>© 2023 Galerie Photo Événements. Tous droits réservés.</p>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
</footer>
|
121 |
+
|
122 |
+
<script>
|
123 |
+
// Sample gallery data
|
124 |
+
const galleryData = [
|
125 |
+
{
|
126 |
+
id: 1,
|
127 |
+
title: "Mariage d'été",
|
128 |
+
category: "mariage",
|
129 |
+
image: "https://source.unsplash.com/random/600x400/?wedding,1",
|
130 |
+
description: "Un magnifique mariage en plein air avec décoration florale."
|
131 |
+
},
|
132 |
+
{
|
133 |
+
id: 2,
|
134 |
+
title: "Anniversaire surprise",
|
135 |
+
category: "anniversaire",
|
136 |
+
image: "https://source.unsplash.com/random/600x400/?birthday,1",
|
137 |
+
description: "Fête d'anniversaire surprise organisée pour les 40 ans de Marie."
|
138 |
+
},
|
139 |
+
{
|
140 |
+
id: 3,
|
141 |
+
title: "Conférence annuelle",
|
142 |
+
category: "entreprise",
|
143 |
+
image: "https://source.unsplash.com/random/600x400/?conference,1",
|
144 |
+
description: "Notre conférence annuelle avec plus de 200 participants."
|
145 |
+
},
|
146 |
+
{
|
147 |
+
id: 4,
|
148 |
+
title: "Festival culturel",
|
149 |
+
category: "culturel",
|
150 |
+
image: "https://source.unsplash.com/random/600x400/?festival,1",
|
151 |
+
description: "Participation au festival culturel régional 2023."
|
152 |
+
},
|
153 |
+
{
|
154 |
+
id: 5,
|
155 |
+
title: "Mariage traditionnel",
|
156 |
+
category: "mariage",
|
157 |
+
image: "https://source.unsplash.com/random/600x400/?wedding,2",
|
158 |
+
description: "Cérémonie de mariage traditionnelle avec costumes régionaux."
|
159 |
+
},
|
160 |
+
{
|
161 |
+
id: 6,
|
162 |
+
title: "Team building",
|
163 |
+
category: "entreprise",
|
164 |
+
image: "https://source.unsplash.com/random/600x400/?team,building",
|
165 |
+
description: "Activités de team building pour renforcer la cohésion d'équipe."
|
166 |
+
},
|
167 |
+
{
|
168 |
+
id: 7,
|
169 |
+
title: "Anniversaire enfant",
|
170 |
+
category: "anniversaire",
|
171 |
+
image: "https://source.unsplash.com/random/600x400/?kids,birthday",
|
172 |
+
description: "Fête d'anniversaire thématique pour les 8 ans de Lucas."
|
173 |
+
},
|
174 |
+
{
|
175 |
+
id: 8,
|
176 |
+
title: "Spectacle de danse",
|
177 |
+
category: "culturel",
|
178 |
+
image: "https://source.unsplash.com/random/600x400/?dance,show",
|
179 |
+
description: "Représentation de danse contemporaine lors du festival des arts."
|
180 |
+
},
|
181 |
+
{
|
182 |
+
id: 9,
|
183 |
+
title: "Mariage plage",
|
184 |
+
category: "mariage",
|
185 |
+
image: "https://source.unsplash.com/random/600x400/?beach,wedding",
|
186 |
+
description: "Cérémonie de mariage romantique au coucher du soleil."
|
187 |
+
},
|
188 |
+
{
|
189 |
+
id: 10,
|
190 |
+
title: "Lancement produit",
|
191 |
+
category: "entreprise",
|
192 |
+
image: "https://source.unsplash.com/random/600x400/?product,launch",
|
193 |
+
description: "Événement de lancement de notre nouveau produit phare."
|
194 |
+
},
|
195 |
+
{
|
196 |
+
id: 11,
|
197 |
+
title: "Anniversaire vintage",
|
198 |
+
category: "anniversaire",
|
199 |
+
image: "https://source.unsplash.com/random/600x400/?vintage,party",
|
200 |
+
description: "Fête d'anniversaire sur le thème des années 60."
|
201 |
+
},
|
202 |
+
{
|
203 |
+
id: 12,
|
204 |
+
title: "Exposition artistique",
|
205 |
+
category: "culturel",
|
206 |
+
image: "https://source.unsplash.com/random/600x400/?art,exhibition",
|
207 |
+
description: "Vernissage de notre exposition d'art contemporain."
|
208 |
+
}
|
209 |
+
];
|
210 |
+
|
211 |
+
// DOM Elements
|
212 |
+
const galleryGrid = document.getElementById('gallery-grid');
|
213 |
+
const filterButtons = document.querySelectorAll('.filter-btn');
|
214 |
+
const loadMoreBtn = document.getElementById('load-more');
|
215 |
+
const modal = document.getElementById('image-modal');
|
216 |
+
const modalImage = document.getElementById('modal-image');
|
217 |
+
const modalTitle = document.getElementById('modal-title');
|
218 |
+
const modalDescription = document.getElementById('modal-description');
|
219 |
+
const closeModal = document.getElementById('close-modal');
|
220 |
+
const prevBtn = document.getElementById('prev-btn');
|
221 |
+
const nextBtn = document.getElementById('next-btn');
|
222 |
+
|
223 |
+
// Variables
|
224 |
+
let currentFilter = 'all';
|
225 |
+
let displayedItems = 8;
|
226 |
+
let currentImageIndex = 0;
|
227 |
+
let filteredGallery = [];
|
228 |
+
|
229 |
+
// Initialize gallery
|
230 |
+
function initGallery() {
|
231 |
+
renderGallery();
|
232 |
+
setupEventListeners();
|
233 |
+
}
|
234 |
+
|
235 |
+
// Render gallery based on filter
|
236 |
+
function renderGallery() {
|
237 |
+
galleryGrid.innerHTML = '';
|
238 |
+
|
239 |
+
// Filter gallery items
|
240 |
+
filteredGallery = currentFilter === 'all'
|
241 |
+
? galleryData
|
242 |
+
: galleryData.filter(item => item.category === currentFilter);
|
243 |
+
|
244 |
+
// Display limited number of items
|
245 |
+
const itemsToDisplay = filteredGallery.slice(0, displayedItems);
|
246 |
+
|
247 |
+
// Create gallery items
|
248 |
+
itemsToDisplay.forEach((item, index) => {
|
249 |
+
const galleryItem = document.createElement('div');
|
250 |
+
galleryItem.className = 'gallery-item bg-white rounded-lg overflow-hidden shadow-md cursor-pointer relative group';
|
251 |
+
galleryItem.dataset.category = item.category;
|
252 |
+
galleryItem.dataset.index = index;
|
253 |
+
|
254 |
+
galleryItem.innerHTML = `
|
255 |
+
<div class="relative overflow-hidden">
|
256 |
+
<img src="${item.image}" alt="${item.title}" class="w-full h-48 sm:h-56 object-cover transition duration-300 group-hover:scale-105">
|
257 |
+
<div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center opacity-0 group-hover:opacity-100 transition">
|
258 |
+
<span class="text-white text-lg font-medium"><i class="fas fa-search-plus mr-2"></i>Voir</span>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
<div class="p-4">
|
262 |
+
<h3 class="font-semibold text-lg text-gray-800">${item.title}</h3>
|
263 |
+
<div class="flex items-center mt-2">
|
264 |
+
<span class="inline-block px-2 py-1 text-xs rounded-full ${getCategoryColor(item.category)}">
|
265 |
+
${getCategoryName(item.category)}
|
266 |
+
</span>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
`;
|
270 |
+
|
271 |
+
galleryItem.addEventListener('click', () => openModal(index));
|
272 |
+
galleryGrid.appendChild(galleryItem);
|
273 |
+
});
|
274 |
+
|
275 |
+
// Hide load more button if all items are displayed
|
276 |
+
loadMoreBtn.style.display = displayedItems >= filteredGallery.length ? 'none' : 'block';
|
277 |
+
}
|
278 |
+
|
279 |
+
// Get category name for display
|
280 |
+
function getCategoryName(category) {
|
281 |
+
const names = {
|
282 |
+
'mariage': 'Mariage',
|
283 |
+
'anniversaire': 'Anniversaire',
|
284 |
+
'entreprise': 'Entreprise',
|
285 |
+
'culturel': 'Culturel'
|
286 |
+
};
|
287 |
+
return names[category] || category;
|
288 |
+
}
|
289 |
+
|
290 |
+
// Get category color for badge
|
291 |
+
function getCategoryColor(category) {
|
292 |
+
const colors = {
|
293 |
+
'mariage': 'bg-pink-100 text-pink-800',
|
294 |
+
'anniversaire': 'bg-yellow-100 text-yellow-800',
|
295 |
+
'entreprise': 'bg-blue-100 text-blue-800',
|
296 |
+
'culturel': 'bg-purple-100 text-purple-800'
|
297 |
+
};
|
298 |
+
return colors[category] || 'bg-gray-100 text-gray-800';
|
299 |
+
}
|
300 |
+
|
301 |
+
// Open modal with image
|
302 |
+
function openModal(index) {
|
303 |
+
currentImageIndex = index;
|
304 |
+
const item = filteredGallery[index];
|
305 |
+
|
306 |
+
modalImage.src = item.image;
|
307 |
+
modalImage.alt = item.title;
|
308 |
+
modalTitle.textContent = item.title;
|
309 |
+
modalDescription.textContent = item.description;
|
310 |
+
|
311 |
+
modal.classList.remove('hidden');
|
312 |
+
document.body.style.overflow = 'hidden';
|
313 |
+
|
314 |
+
// Update navigation buttons state
|
315 |
+
updateNavButtons();
|
316 |
+
}
|
317 |
+
|
318 |
+
// Close modal
|
319 |
+
function closeModalHandler() {
|
320 |
+
modal.classList.add('hidden');
|
321 |
+
document.body.style.overflow = 'auto';
|
322 |
+
}
|
323 |
+
|
324 |
+
// Navigate to previous image
|
325 |
+
function prevImage() {
|
326 |
+
if (currentImageIndex > 0) {
|
327 |
+
currentImageIndex--;
|
328 |
+
openModal(currentImageIndex);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
// Navigate to next image
|
333 |
+
function nextImage() {
|
334 |
+
if (currentImageIndex < filteredGallery.length - 1) {
|
335 |
+
currentImageIndex++;
|
336 |
+
openModal(currentImageIndex);
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
// Update navigation buttons state
|
341 |
+
function updateNavButtons() {
|
342 |
+
prevBtn.disabled = currentImageIndex === 0;
|
343 |
+
nextBtn.disabled = currentImageIndex === filteredGallery.length - 1;
|
344 |
+
|
345 |
+
if (prevBtn.disabled) {
|
346 |
+
prevBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
347 |
+
} else {
|
348 |
+
prevBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
349 |
+
}
|
350 |
+
|
351 |
+
if (nextBtn.disabled) {
|
352 |
+
nextBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
353 |
+
} else {
|
354 |
+
nextBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
+
// Filter gallery by category
|
359 |
+
function filterGallery(filter) {
|
360 |
+
currentFilter = filter;
|
361 |
+
displayedItems = 8;
|
362 |
+
renderGallery();
|
363 |
+
|
364 |
+
// Update active filter button
|
365 |
+
filterButtons.forEach(btn => {
|
366 |
+
btn.classList.toggle('active', btn.dataset.filter === filter);
|
367 |
+
});
|
368 |
+
}
|
369 |
+
|
370 |
+
// Load more items
|
371 |
+
function loadMoreItems() {
|
372 |
+
displayedItems += 4;
|
373 |
+
renderGallery();
|
374 |
+
}
|
375 |
+
|
376 |
+
// Setup event listeners
|
377 |
+
function setupEventListeners() {
|
378 |
+
// Filter buttons
|
379 |
+
filterButtons.forEach(btn => {
|
380 |
+
btn.addEventListener('click', () => filterGallery(btn.dataset.filter));
|
381 |
+
});
|
382 |
+
|
383 |
+
// Load more button
|
384 |
+
loadMoreBtn.addEventListener('click', loadMoreItems);
|
385 |
+
|
386 |
+
// Modal events
|
387 |
+
closeModal.addEventListener('click', closeModalHandler);
|
388 |
+
prevBtn.addEventListener('click', prevImage);
|
389 |
+
nextBtn.addEventListener('click', nextImage);
|
390 |
+
|
391 |
+
// Close modal when clicking outside
|
392 |
+
modal.addEventListener('click', (e) => {
|
393 |
+
if (e.target === modal) {
|
394 |
+
closeModalHandler();
|
395 |
+
}
|
396 |
+
});
|
397 |
+
|
398 |
+
// Keyboard navigation
|
399 |
+
document.addEventListener('keydown', (e) => {
|
400 |
+
if (!modal.classList.contains('hidden')) {
|
401 |
+
if (e.key === 'Escape') {
|
402 |
+
closeModalHandler();
|
403 |
+
} else if (e.key === 'ArrowLeft') {
|
404 |
+
prevImage();
|
405 |
+
} else if (e.key === 'ArrowRight') {
|
406 |
+
nextImage();
|
407 |
+
}
|
408 |
+
}
|
409 |
+
});
|
410 |
+
}
|
411 |
+
|
412 |
+
// Initialize the gallery when DOM is loaded
|
413 |
+
document.addEventListener('DOMContentLoaded', initGallery);
|
414 |
+
</script>
|
415 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=jerome-dreville/arc-galeries" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
416 |
+
</html>
|