diff --git a/src/app.html b/src/app.html index ecd5efc..eecc1c1 100644 --- a/src/app.html +++ b/src/app.html @@ -2,8 +2,13 @@ - + %sveltekit.head% diff --git a/src/lib/assets/camera.svg b/src/lib/assets/camera.svg new file mode 100644 index 0000000..5ae8cc9 --- /dev/null +++ b/src/lib/assets/camera.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/lib/assets/cross.svg b/src/lib/assets/cross.svg new file mode 100644 index 0000000..3e3d65b --- /dev/null +++ b/src/lib/assets/cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/lib/assets/logo.svg b/src/lib/assets/logo.svg new file mode 100644 index 0000000..80e48f7 --- /dev/null +++ b/src/lib/assets/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte new file mode 100644 index 0000000..573e087 --- /dev/null +++ b/src/lib/components/Button.svelte @@ -0,0 +1,30 @@ + + + + + diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte new file mode 100644 index 0000000..baed206 --- /dev/null +++ b/src/lib/components/Navbar.svelte @@ -0,0 +1,45 @@ + + + + + diff --git a/src/lib/components/SpaceCard.svelte b/src/lib/components/SpaceCard.svelte index f599a4a..ac4b5f5 100644 --- a/src/lib/components/SpaceCard.svelte +++ b/src/lib/components/SpaceCard.svelte @@ -5,17 +5,18 @@ alt: string; imgSrc: string; description?: Snippet; + href?: string; } - const { alt, imgSrc, description }: Props = $props(); + const { alt, imgSrc, description, href }: Props = $props(); -
+
{@render description?.()}
-
+ diff --git a/src/lib/components/inputs/Text.svelte b/src/lib/components/inputs/Text.svelte new file mode 100644 index 0000000..494a68d --- /dev/null +++ b/src/lib/components/inputs/Text.svelte @@ -0,0 +1,29 @@ + + + + + diff --git a/src/lib/components/inputs/Textarea.svelte b/src/lib/components/inputs/Textarea.svelte new file mode 100644 index 0000000..11efe53 --- /dev/null +++ b/src/lib/components/inputs/Textarea.svelte @@ -0,0 +1,32 @@ + + + + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9c2d011..bea97c6 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,12 +1,35 @@ + + Study Spaces + + + {@render children?.()} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index dc60d41..2f0002e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,59 +1,19 @@ + + + new + + +
{#each studySpaces as studySpace (studySpace.id)} {@const imgUrl = @@ -62,7 +22,11 @@ .from("files_bucket") .getPublicUrl(studySpace.study_space_images[0].image_path).data.publicUrl : defaultImg} - + {#snippet description()}

{studySpace.description}

{/snippet} @@ -70,37 +34,6 @@ {/each}
-
{ - e.preventDefault(); - uploadStudySpace(); - }} -> - - - - - -
- diff --git a/src/routes/space/+page.svelte b/src/routes/space/+page.svelte new file mode 100644 index 0000000..2a771e4 --- /dev/null +++ b/src/routes/space/+page.svelte @@ -0,0 +1,118 @@ + + + + + close + + + +
{ + event.preventDefault(); + await uploadStudySpace(); + }} +> + + + + + + +