From 856db4599abe299d53a390d87f19382b6e86ceba Mon Sep 17 00:00:00 2001 From: not manx Date: Fri, 31 Jul 2020 04:07:31 +0100 Subject: [PATCH] Add comments and cleanup --- .gitignore | 2 +- src/App.svelte | 3 --- src/index.svelte | 14 +++++++++----- src/lightbox.svelte | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 4064c60..36170a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules -public/out +public diff --git a/src/App.svelte b/src/App.svelte index 9bd7b94..208593f 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,9 +1,6 @@ {#if file_list}
- {#each thumb_list as thumb, i} - open_lightbox(i)} src="{url.root}{url.thumb}{thumb}" /> - {/each} + {#each thumb_list as thumb, i} + open_lightbox(i)} src="{url.root}{url.thumb}{thumb}" /> + {/each}
{/if} diff --git a/src/lightbox.svelte b/src/lightbox.svelte index b4d5aa7..74be78c 100644 --- a/src/lightbox.svelte +++ b/src/lightbox.svelte @@ -10,7 +10,8 @@ $: image = open !== null && open >= 0 ? set_images() : ''; $: is_open(open); - + + // This needs renamed function is_open(i) { if (should_open && i !== null && i >= 0) { class_list += ' open' @@ -85,7 +86,7 @@ width: 100vw; height: 100vh; opacity: 1; - transition: opacity 1s; + transition: opacity 1s; /* This is being applied when we add `slide_classes' */ display: flex; justify-content: center; align-items: center; @@ -96,7 +97,6 @@ background-color: rgba(0,0,0,0.7); z-index: 0; } -