deleted dead code
This commit is contained in:
1 parent
a65b782e0e
commit
fca0e2f96a
5 files changed
+27
-33
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
node_modules/
|
||||||
|
.vscode/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
Thumbs.db
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
+1
-4
@@ -2,7 +2,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="style/styles.css">
|
<link rel="stylesheet" href="style/styles.css">
|
||||||
<link rel="stylesheet" href="style/about.css">
|
|
||||||
<link rel="stylesheet" href="style/gallery.css">
|
<link rel="stylesheet" href="style/gallery.css">
|
||||||
<link rel="stylesheet" href="style/ahmet.css">
|
<link rel="stylesheet" href="style/ahmet.css">
|
||||||
<link rel="stylesheet" href="style/comments.css">
|
<link rel="stylesheet" href="style/comments.css">
|
||||||
@@ -110,9 +109,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="js/gallery.js" defer></script>
|
<script src="js/gallery.js" defer></script> <script src="js/tabs.js" defer></script>
|
||||||
<script src="js/hideBroken.js" defer></script>
|
|
||||||
<script src="js/tabs.js" defer></script>
|
|
||||||
|
|
||||||
<!-- Firebase SDK (loaded before comments.js) -->
|
<!-- Firebase SDK (loaded before comments.js) -->
|
||||||
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-app-compat.js"></script>
|
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-app-compat.js"></script>
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Firebase is configured — hide the setup warning
|
||||||
|
if (warning) warning.style.display = 'none';
|
||||||
|
|
||||||
// ── Firebase init ────────────────────────────────────────────
|
// ── Firebase init ────────────────────────────────────────────
|
||||||
firebase.initializeApp(FIREBASE_CONFIG);
|
firebase.initializeApp(FIREBASE_CONFIG);
|
||||||
const db = firebase.firestore();
|
const db = firebase.firestore();
|
||||||
|
|||||||
+16
-16
@@ -29,10 +29,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
for (let i = 1; i <= totalImages; i++) {
|
for (let i = 1; i <= totalImages; i++) {
|
||||||
const img = document.createElement('img');
|
const img = document.createElement('img');
|
||||||
img.alt = `${folderName} Image ${i}`;
|
img.alt = `${folderName} Image ${i}`;
|
||||||
|
|
||||||
// Load the thumbnail instead of the full image
|
// Load the thumbnail instead of the full image
|
||||||
img.src = `${folderName}/thumbnails/${i}.jpg`;
|
img.src = `${folderName}/thumbnails/${i}.jpg`;
|
||||||
|
|
||||||
// If thumbnail fails to load, it means the image doesn't exist at all
|
// If thumbnail fails to load, it means the image doesn't exist at all
|
||||||
img.onerror = () => { img.style.display = 'none'; };
|
img.onerror = () => { img.style.display = 'none'; };
|
||||||
|
|
||||||
@@ -40,22 +40,22 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
img.onclick = () => {
|
img.onclick = () => {
|
||||||
lightbox.style.display = "block";
|
lightbox.style.display = "block";
|
||||||
lightboxImg.src = ""; // Clear previous image
|
lightboxImg.src = ""; // Clear previous image
|
||||||
|
|
||||||
// Try loading original full quality image: jpg -> png -> gif
|
// Try loading original full quality image: jpg -> png -> gif
|
||||||
const tryLoad = (extensions) => {
|
const tryLoad = (extensions) => {
|
||||||
if (extensions.length === 0) return; // All failed
|
if (extensions.length === 0) return; // All failed
|
||||||
const testExt = extensions.shift();
|
const testExt = extensions.shift();
|
||||||
|
|
||||||
const tempImg = new Image();
|
const tempImg = new Image();
|
||||||
tempImg.onload = () => {
|
tempImg.onload = () => {
|
||||||
lightboxImg.src = tempImg.src; // Success! Show it.
|
lightboxImg.src = tempImg.src; // Success! Show it.
|
||||||
};
|
};
|
||||||
tempImg.onerror = () => {
|
tempImg.onerror = () => {
|
||||||
tryLoad(extensions); // Failed, try next extension
|
tryLoad(extensions); // Failed, try next extension
|
||||||
};
|
};
|
||||||
tempImg.src = `${folderName}/${i}.${testExt}`;
|
tempImg.src = `${folderName}/${i}.${testExt}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Start trying to find the full image
|
// Start trying to find the full image
|
||||||
tryLoad(['jpg', 'png', 'gif']);
|
tryLoad(['jpg', 'png', 'gif']);
|
||||||
};
|
};
|
||||||
@@ -68,5 +68,5 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
loadGallery('gallery-container', 'gallery', 50);
|
loadGallery('gallery-container', 'gallery', 50);
|
||||||
|
|
||||||
// Load your new Ahmet Museum (adjust the number 20 to however many photos you have)
|
// 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);
|
||||||
});
|
});
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user