Skip to content

Commit 61a6b2b

Browse files
committed
images overhaul - shared resource
1 parent 82ec8ee commit 61a6b2b

File tree

13 files changed

+133
-42
lines changed

13 files changed

+133
-42
lines changed

assets/css/styles.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,38 @@ section {
210210
color: #555;
211211
}
212212

213+
#lightbox-overlay {
214+
position: fixed;
215+
inset: 0;
216+
background: rgba(0, 0, 0, 0.9);
217+
display: flex;
218+
justify-content: center;
219+
align-items: center;
220+
z-index: 9999;
221+
animation: fadeIn 0.2s ease;
222+
}
223+
224+
.lightbox-image {
225+
max-width: 90%;
226+
max-height: 90%;
227+
box-shadow: 0 0 30px rgba(255,255,255,0.2);
228+
border-radius: 4px;
229+
}
230+
231+
.lightbox-close {
232+
position: absolute;
233+
top: 20px;
234+
right: 30px;
235+
font-size: 40px;
236+
color: white;
237+
cursor: pointer;
238+
}
239+
240+
@keyframes fadeIn {
241+
from { opacity: 0; }
242+
to { opacity: 1; }
243+
}
244+
213245
/* ---------------- Contact Info ---------------- */
214246
.contact-info {
215247
font-family: 'Lora', serif;

assets/images/tom2.jpg

-622 KB
Loading

assets/images/tom4.jpg

-961 KB
Loading

assets/images/tom5.jpg

100755100644
705 KB
Loading

assets/images/tom6.jpg

-481 KB
Loading

assets/images/tom7.jpg

993 KB
Loading

assets/images/tom8.jpg

117 KB
Loading

assets/images/tom9.jpg

520 KB
Loading

de/gallery.html

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,7 @@ <h1>Fotogalerie</h1>
2424
<p class="tagline">Einblicke in Auftritte und Momente von Tom Ash</p>
2525
</header>
2626

27-
<section class="gallery-list">
28-
<figure>
29-
<img src="/assets/images/tom1.jpg" alt="Tom Ash 1">
30-
</figure>
31-
<figure>
32-
<img src="/assets/images/tom2.jpg" alt="Tom Ash 2">
33-
</figure>
34-
<figure>
35-
<img src="/assets/images/tom3.jpg" alt="Tom Ash 3">
36-
</figure>
37-
<figure>
38-
<img src="/assets/images/tom4.jpg" alt="Tom Ash 4">
39-
</figure>
40-
<figure>
41-
<img src="/assets/images/tom5.jpg" alt="Tom Ash 5">
42-
</figure>
43-
<figure>
44-
<img src="/assets/images/tom6.jpg" alt="Tom Ash 6">
45-
</figure>
46-
</section>
27+
<section class="gallery-list" id="gallery-placeholder"></section>
4728

4829
<section class="music-links">
4930
<a href="https://tomashlive.bandcamp.com/" target="_blank" class="music-item">
@@ -57,6 +38,41 @@ <h1>Fotogalerie</h1>
5738
</a>
5839
</section>
5940

41+
<script>
42+
fetch('/shared/images-list.html')
43+
.then(response => response.text())
44+
.then(data => {
45+
document.getElementById('gallery-placeholder').innerHTML = data;
46+
initLightbox();
47+
})
48+
.catch(error => console.error('Error loading gallery:', error));
49+
50+
51+
function initLightbox() {
52+
const images = document.querySelectorAll('#gallery-placeholder img');
53+
54+
images.forEach(img => {
55+
img.style.cursor = "pointer";
56+
img.addEventListener("click", () => openLightbox(img.src));
57+
});
58+
}
59+
60+
function openLightbox(src) {
61+
const overlay = document.createElement("div");
62+
overlay.id = "lightbox-overlay";
63+
overlay.innerHTML = `
64+
<span class="lightbox-close">&times;</span>
65+
<img src="${src}" class="lightbox-image">
66+
`;
67+
68+
document.body.appendChild(overlay);
69+
70+
overlay.addEventListener("click", () => {
71+
overlay.remove();
72+
});
73+
}
74+
</script>
75+
6076
<script src="/assets/js/load-nav.js"></script>
6177

6278
</body>

de/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<section class="video">
4646
<iframe
47-
src="https://www.youtube.com/embed/AHMbB0CLAcE"
47+
src="https://www.youtube.com/embed/usY3I9VkljE"
4848
title="Tom Ash Live Performance"
4949
frameborder="0"
5050
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"

0 commit comments

Comments
 (0)