diff --git a/src/lib/assets/arrow_right.svg b/src/lib/assets/arrow_right.svg
new file mode 100644
index 0000000..874ecb6
--- /dev/null
+++ b/src/lib/assets/arrow_right.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/lib/components/Carousel.svelte b/src/lib/components/Carousel.svelte
new file mode 100644
index 0000000..b26229c
--- /dev/null
+++ b/src/lib/components/Carousel.svelte
@@ -0,0 +1,134 @@
+
+
+
+
+ {#each urls as url, idx (`${idx}|${url}`)}
+
+

+ {#if ondelete}
+
+ {/if}
+
+ {/each}
+
+ {#if scrollPosition > clientWidth / 2}
+
+ {/if}
+ {#if scrollPosition < scrollWidth - clientWidth * 1.5}
+
+ {/if}
+
+ {Math.round(scrollPosition / clientWidth) + 1} / {urls.length}
+
+
+
+
diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte
index ff8bd72..7cb89ea 100644
--- a/src/lib/components/Navbar.svelte
+++ b/src/lib/components/Navbar.svelte
@@ -29,6 +29,7 @@
box-shadow: 0rem 0rem 0.5rem #182125;
align-items: center;
overflow: hidden;
+ z-index: 100;
}
.logo {
diff --git a/src/routes/space/[id]/+page.svelte b/src/routes/space/[id]/+page.svelte
index fde6d34..b8121e6 100644
--- a/src/routes/space/[id]/+page.svelte
+++ b/src/routes/space/[id]/+page.svelte
@@ -2,16 +2,19 @@
import Navbar from "$lib/components/Navbar.svelte";
import crossUrl from "$lib/assets/cross.svg";
import placeholder from "$lib/assets/study_space.png";
+ import Carousel from "$lib/components/Carousel.svelte";
const { data } = $props();
const { space, supabase } = $derived(data);
- const imgUrl = $derived(
- space.study_space_images.length > 0
- ? supabase.storage
- .from("files_bucket")
- .getPublicUrl(space.study_space_images[0].image_path).data.publicUrl
- : placeholder
+ const imgUrls = $derived(
+ space.study_space_images.length === 0
+ ? [placeholder]
+ : space.study_space_images.map(
+ (img) =>
+ supabase.storage.from("files_bucket").getPublicUrl(img.image_path).data
+ .publicUrl
+ )
);
@@ -22,7 +25,7 @@
-
+
{space.location}
@@ -61,6 +64,7 @@
margin: 0 auto;
}
.nameContainer {
+ z-index: 10;
display: block;
width: 100%;
padding: 0.6rem;