diff --git a/out/index.html b/out/index.html
index 19fc5f4..cbaad4f 100644
--- a/out/index.html
+++ b/out/index.html
@@ -26,6 +26,7 @@
background-color: rgba(0, 0, 0, 0.8);
align-items: center;
justify-content: center;
+ z-index: 1000;
}
#lightbox img {
max-width: 80%;
@@ -34,6 +35,11 @@
#lightbox #caption {
color: white;
margin-top: 20px;
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ transform: translateX(-50%);
+ text-align: center;
}
@@ -42,7 +48,7 @@
Image Gallery
-
+
@@ -53,6 +59,9 @@
+
+ function navigateLightbox(direction) {
+ var newIndex = currentImageIndex + direction;
+ // Looping over if the index goes out of bounds
+ if (newIndex >= imageArray.length) {
+ newIndex = 0;
+ } else if (newIndex < 0) {
+ newIndex = imageArray.length - 1;
+ }
+ // Checking if the new image is visible
+ if (imageArray[newIndex].style.display !== 'none') {
+ currentImageIndex = newIndex;
+ var newImage = imageArray[currentImageIndex];
+ openLightbox(newImage.src, newImage.src.split('/').pop());
+ } else {
+ // Recursively call the function to skip non-visible images
+ navigateLightbox(direction);
+ }
+ }
+ window.onload = function() {
+ loadImages();
+ updateGridLayout(document.getElementById('layoutSlider').value);
+ };
+