lol it dont work anymore

This commit is contained in:
esefxdz committed 2025-09-16 19:25:45 +03:00
1 parent aa204a2329
commit dd65ea7b06
2 files changed
+7 -55

No files matched your search

+2 -3
View File
@@ -1,15 +1,14 @@
document.addEventListener('DOMContentLoaded', () => {
const galleryContainer = document.getElementById('gallery-container');
// Get file list from HTML attribute
// Get filenames from HTML attribute
const files = galleryContainer.dataset.files.split(',');
files.forEach((file, index) => {
const img = document.createElement('img');
img.src = `gallery/${file.trim()}`;
img.alt = `Image ${index + 1}`;
img.onerror = () => { img.style.display = 'none'; }; // hide broken
img.onerror = () => { img.style.display = 'none'; }; // hide broken images
galleryContainer.appendChild(img);
});
});