diff --git a/src/lib/components/MasonryPhotoGrid.svelte b/src/lib/components/MasonryPhotoGrid.svelte
index ce9a29f..1da4992 100644
--- a/src/lib/components/MasonryPhotoGrid.svelte
+++ b/src/lib/components/MasonryPhotoGrid.svelte
@@ -10,4 +10,4 @@
let { photos = [], columns = 'auto' }: Props = $props()
-
diff --git a/src/lib/components/PhotoGrid.svelte b/src/lib/components/PhotoGrid.svelte
index 7d6452e..4c0b114 100644
--- a/src/lib/components/PhotoGrid.svelte
+++ b/src/lib/components/PhotoGrid.svelte
@@ -21,22 +21,21 @@
class: className = ''
}: Props = $props()
-
-
// Split photos into columns for column-based layouts
function splitIntoColumns(photos: Photo[], numColumns: number): Photo[][] {
const columns: Photo[][] = Array.from({ length: numColumns }, () => [])
-
+
photos.forEach((photo, index) => {
columns[index % numColumns].push(photo)
})
-
+
return columns
}
-
const columnPhotos = $derived(
- (columns === 1 || columns === 2 || columns === 3) && !masonry ? splitIntoColumns(photos, columns) : []
+ (columns === 1 || columns === 2 || columns === 3) && !masonry
+ ? splitIntoColumns(photos, columns)
+ : []
)
// Window width for responsive masonry
@@ -45,9 +44,9 @@
// Calculate masonry column widths based on columns prop
const masonryConfig = $derived(() => {
if (!masonry) return null
-
+
const gapSize = gap === 'small' ? 8 : gap === 'large' ? 32 : 16
-
+
if (columns === 1) {
const width = windowWidth - 64 // Account for padding
return { minColWidth: width, maxColWidth: width, gap: gapSize }
@@ -55,7 +54,7 @@
const width = Math.floor((windowWidth - 64 - gapSize) / 2)
return { minColWidth: width - 10, maxColWidth: width + 10, gap: gapSize }
} else if (columns === 3) {
- const width = Math.floor((windowWidth - 64 - (gapSize * 2)) / 3)
+ const width = Math.floor((windowWidth - 64 - gapSize * 2) / 3)
return { minColWidth: width - 10, maxColWidth: width + 10, gap: gapSize }
} else {
// Auto columns
@@ -90,7 +89,7 @@
>
{#snippet children({ item })}
-
+
{#if showCaptions}
{item.caption || ''}
{/if}
@@ -147,7 +146,7 @@
&--3-column {
display: flex;
gap: var(--grid-gap);
-
+
@include breakpoint('mobile') {
flex-direction: column;
}
@@ -233,4 +232,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/src/lib/components/SingleColumnPhotoGrid.svelte b/src/lib/components/SingleColumnPhotoGrid.svelte
index f06ba47..ff51cee 100644
--- a/src/lib/components/SingleColumnPhotoGrid.svelte
+++ b/src/lib/components/SingleColumnPhotoGrid.svelte
@@ -9,4 +9,4 @@
let { photos = [] }: Props = $props()
-
\ No newline at end of file
+
diff --git a/src/lib/components/ThreeColumnPhotoGrid.svelte b/src/lib/components/ThreeColumnPhotoGrid.svelte
index ad2df82..4687db7 100644
--- a/src/lib/components/ThreeColumnPhotoGrid.svelte
+++ b/src/lib/components/ThreeColumnPhotoGrid.svelte
@@ -9,4 +9,4 @@
let { photos = [] }: Props = $props()
-
\ No newline at end of file
+
diff --git a/src/lib/components/TwoColumnPhotoGrid.svelte b/src/lib/components/TwoColumnPhotoGrid.svelte
index 5be9155..d915802 100644
--- a/src/lib/components/TwoColumnPhotoGrid.svelte
+++ b/src/lib/components/TwoColumnPhotoGrid.svelte
@@ -9,4 +9,4 @@
let { photos = [] }: Props = $props()
-
\ No newline at end of file
+
diff --git a/src/lib/components/admin/BaseDropdown.svelte b/src/lib/components/admin/BaseDropdown.svelte
index 43cd090..3024a22 100644
--- a/src/lib/components/admin/BaseDropdown.svelte
+++ b/src/lib/components/admin/BaseDropdown.svelte
@@ -53,7 +53,7 @@
{@render trigger()}
-
+
{#if dropdown}