diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b7d23d --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules/ +.vscode/ +__pycache__/ +*.pyc +Thumbs.db +*.log +.DS_Store \ No newline at end of file diff --git a/index.html b/index.html index ccf26d5..a7d17dc 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,6 @@
- @@ -110,9 +109,7 @@ - - - + diff --git a/js/comments.js b/js/comments.js index e7bb0fd..4f26997 100644 --- a/js/comments.js +++ b/js/comments.js @@ -103,6 +103,9 @@ document.addEventListener('DOMContentLoaded', () => { return; } + // Firebase is configured — hide the setup warning + if (warning) warning.style.display = 'none'; + // ── Firebase init ──────────────────────────────────────────── firebase.initializeApp(FIREBASE_CONFIG); const db = firebase.firestore(); diff --git a/js/gallery.js b/js/gallery.js index 08e407c..687da31 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -29,10 +29,10 @@ document.addEventListener('DOMContentLoaded', () => { for (let i = 1; i <= totalImages; i++) { const img = document.createElement('img'); img.alt = `${folderName} Image ${i}`; - + // Load the thumbnail instead of the full image img.src = `${folderName}/thumbnails/${i}.jpg`; - + // If thumbnail fails to load, it means the image doesn't exist at all img.onerror = () => { img.style.display = 'none'; }; @@ -40,22 +40,22 @@ document.addEventListener('DOMContentLoaded', () => { img.onclick = () => { lightbox.style.display = "block"; lightboxImg.src = ""; // Clear previous image - + // Try loading original full quality image: jpg -> png -> gif const tryLoad = (extensions) => { - if (extensions.length === 0) return; // All failed - const testExt = extensions.shift(); - - const tempImg = new Image(); - tempImg.onload = () => { - lightboxImg.src = tempImg.src; // Success! Show it. - }; - tempImg.onerror = () => { - tryLoad(extensions); // Failed, try next extension - }; - tempImg.src = `${folderName}/${i}.${testExt}`; + if (extensions.length === 0) return; // All failed + const testExt = extensions.shift(); + + const tempImg = new Image(); + tempImg.onload = () => { + lightboxImg.src = tempImg.src; // Success! Show it. + }; + tempImg.onerror = () => { + tryLoad(extensions); // Failed, try next extension + }; + tempImg.src = `${folderName}/${i}.${testExt}`; }; - + // Start trying to find the full image tryLoad(['jpg', 'png', 'gif']); }; @@ -68,5 +68,5 @@ document.addEventListener('DOMContentLoaded', () => { loadGallery('gallery-container', 'gallery', 50); // Load your new Ahmet Museum (adjust the number 20 to however many photos you have) - loadGallery('ahmet-container', 'ahmet', 20); + loadGallery('ahmet-container', 'ahmet', 20); }); \ No newline at end of file diff --git a/style/about.css b/style/about.css deleted file mode 100644 index 475b000..0000000 --- a/style/about.css +++ /dev/null @@ -1,13 +0,0 @@ -#about-link-btn { - background-color:aliceblue; - color:#f0f8ff; - border: none; - padding: 12px 24px; - border-radius: 8px; - cursor: pointer; - transition: box-shadow 0.3s ease; -} - -#about-link-btn:hover { - box-shadow: 0 0 10px #02e3ff; -} \ No newline at end of file