diff --git a/gallery-container.html b/gallery-container.html index 141ebed..37f2aa9 100644 --- a/gallery-container.html +++ b/gallery-container.html @@ -1,16 +1,52 @@ - - - - - Gallery - - - - - - - - - + \ No newline at end of file diff --git a/js/gallery.js b/js/gallery.js index 18a9480..fc23ce5 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -1,17 +1,12 @@ document.addEventListener('DOMContentLoaded', () => { const galleryContainer = document.getElementById('gallery-container'); - if (!galleryContainer) { - console.error("Gallery container not found!"); - return; - } + const totalImages = 50; // number of images you want to load - const files = galleryContainer.dataset.files.split(','); - - files.forEach((file, index) => { + for (let i = 1; i <= totalImages; i++) { const img = document.createElement('img'); - img.src = `gallery/${file.trim()}`; - img.alt = `Image ${index + 1}`; - img.onerror = () => { img.style.display = 'none'; }; + img.src = `gallery/${i}.jpg`; // assuming .jpg extension, change if needed + img.alt = `Image ${i}`; + img.onerror = () => { img.style.display = 'none'; }; // hide broken images galleryContainer.appendChild(img); - }); + } });