diff --git a/gallery-container.html b/gallery-container.html index 37f2aa9..dee4735 100644 --- a/gallery-container.html +++ b/gallery-container.html @@ -1,52 +1,5 @@ - \ No newline at end of file + + + diff --git a/js/gallery.js b/js/gallery.js index e6e665a..294693a 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -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); }); }); -