diff --git a/src/lib/NavClose.svelte b/src/lib/Close.svelte
similarity index 100%
rename from src/lib/NavClose.svelte
rename to src/lib/Close.svelte
diff --git a/src/lib/Gallery.svelte b/src/lib/Gallery.svelte
index 3906fe3..17fc1ae 100644
--- a/src/lib/Gallery.svelte
+++ b/src/lib/Gallery.svelte
@@ -4,6 +4,7 @@
import { linear } from "svelte/easing";
import ArrowLeft from "$lib/ArrowLeft.svelte";
import ArrowRight from "$lib/ArrowRight.svelte";
+ import Close from "$lib/Close.svelte";
export let images;
export let arrowColor;
@@ -13,6 +14,7 @@
let selectedImageIndex = 0
let elements = [];
+ let fullscreenShown = false;
const scrollConfig = {
behavior: 'smooth',
@@ -48,12 +50,38 @@
elements[selectedImageIndex].scrollIntoView(scrollConfig)
});
}
+
+ const openFullscreen = () => {
+ fullscreenShown = true
+ document.body.classList.add("no-scroll")
+ }
+
+ const closeFullscreen = () => {
+ fullscreenShown = false
+ document.body.classList.remove("no-scroll")
+ }
-
+
+
+
+
@@ -161,6 +189,55 @@
align-items: center;
}
+ .button-reset {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background-color: rgba(0, 0, 0, 0);
+ cursor: pointer;
+ }
+
+ .fullscreen {
+ position: fixed;
+ display: none;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ justify-content: center;
+ align-items: center;
+ background-color: rgba(0, 0, 0, 0.75);
+ z-index: 5;
+ }
+
+ .fullscreen-close {
+ position: absolute;
+ top: 2rem;
+ right: 2rem;
+ }
+
+ .fullscreen figcaption {
+ font-family: 'Roboto', serif;
+ font-size: 18px;
+ line-height: 22px;
+ color: #FFFFFF;
+ text-align: start;
+ overflow: auto;
+ }
+
+ .fullscreen figure {
+ margin: 1rem;
+ }
+
+ .fullscreen figure img {
+ cursor: auto;
+ }
+
+ .fullscreen .current-image {
+ max-width: 90vw;
+ max-height: 90vh;
+ }
+
@media only screen and (max-width: 580px) {
.big-screen {
display: none;
@@ -174,4 +251,11 @@
display: flex;
}
}
+
+ @media only screen and (max-width: 800px) {
+ .fullscreen .current-image {
+ max-width: 100%;
+ max-height: 90vh;
+ }
+ }
diff --git a/src/lib/Navbar.svelte b/src/lib/Navbar.svelte
index f69d508..33711ca 100644
--- a/src/lib/Navbar.svelte
+++ b/src/lib/Navbar.svelte
@@ -1,6 +1,6 @@