From 4a24fbd3b7e34717903be4cd8b7d9f92599ad10b Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 26 May 2025 11:53:36 -0700 Subject: [PATCH] images and slideshows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lightbox still doesn’t close when clicking background --- src/assets/styles/variables.scss | 1 + src/lib/components/ImagePost.svelte | 123 +++++++++---- src/lib/components/Lightbox.svelte | 266 ++++++++++++++++++++++++++++ 3 files changed, 360 insertions(+), 30 deletions(-) create mode 100644 src/lib/components/Lightbox.svelte diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 1dd4be8..0bddff8 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -25,6 +25,7 @@ $unit-20x: $unit * 20; /* Page properties * -------------------------------------------------------------------------- */ $page-corner-radius: $unit; +$image-corner-radius: $unit-2x; $card-corner-radius: $unit-3x; $page-top-margin: $unit-6x; diff --git a/src/lib/components/ImagePost.svelte b/src/lib/components/ImagePost.svelte index d50bedf..1c4e1e9 100644 --- a/src/lib/components/ImagePost.svelte +++ b/src/lib/components/ImagePost.svelte @@ -1,4 +1,6 @@ {#if images.length === 1} -
+
+ {:else if images.length > 1}
-
+
+
- {#each images as image, index} - + {#each Array(totalSlots) as _, index} + {#if index < images.length} + + {:else} + + {/if} {/each}
{/if} + + \ No newline at end of file + diff --git a/src/lib/components/Lightbox.svelte b/src/lib/components/Lightbox.svelte new file mode 100644 index 0000000..3159949 --- /dev/null +++ b/src/lib/components/Lightbox.svelte @@ -0,0 +1,266 @@ + + +{#if isOpen} + +{/if} + + \ No newline at end of file