From 049b6be57f4ca6566fdf81b5c1890066836ca7a2 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 19 Jun 2025 01:55:04 +0100 Subject: [PATCH] Add new photo grid view components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SingleColumnPhotoGrid: Displays photos in a single centered column - TwoColumnPhotoGrid: Splits photos evenly between two columns - HorizontalScrollPhotoGrid: Shows photos in a horizontal scrolling view 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../HorizontalScrollPhotoGrid.svelte | 76 +++++++++++++++++++ src/lib/components/TwoColumnPhotoGrid.svelte | 51 +++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 src/lib/components/HorizontalScrollPhotoGrid.svelte create mode 100644 src/lib/components/TwoColumnPhotoGrid.svelte diff --git a/src/lib/components/HorizontalScrollPhotoGrid.svelte b/src/lib/components/HorizontalScrollPhotoGrid.svelte new file mode 100644 index 0000000..a13d7fe --- /dev/null +++ b/src/lib/components/HorizontalScrollPhotoGrid.svelte @@ -0,0 +1,76 @@ + + +
+ {#each photoItems as item} + {#if isAlbum(item)} + + {item.title} +

{item.title}

+
+ {:else} + {@const mediaId = item.id.replace(/^(media|photo)-/, '')} + + {item.alt} + {#if item.caption} +

{item.caption}

+ {/if} +
+ {/if} + {/each} +
+ + diff --git a/src/lib/components/TwoColumnPhotoGrid.svelte b/src/lib/components/TwoColumnPhotoGrid.svelte new file mode 100644 index 0000000..866807c --- /dev/null +++ b/src/lib/components/TwoColumnPhotoGrid.svelte @@ -0,0 +1,51 @@ + + +
+
+ {#each column1 as item} + + {/each} +
+
+ {#each column2 as item} + + {/each} +
+
+ + \ No newline at end of file