diff --git a/src/lib/utils/content.ts b/src/lib/utils/content.ts index beebd87..a99024b 100644 --- a/src/lib/utils/content.ts +++ b/src/lib/utils/content.ts @@ -1,5 +1,5 @@ // Render Edra/BlockNote JSON content to HTML -export const renderEdraContent = (content: any): string => { +export const renderEdraContent = (content: any, options: { albumSlug?: string } = {}): string => { if (!content) return '' // Handle Tiptap format first (has type: 'doc') diff --git a/src/routes/albums/+page.svelte b/src/routes/albums/+page.svelte index e27f9ea..a173eec 100644 --- a/src/routes/albums/+page.svelte +++ b/src/routes/albums/+page.svelte @@ -149,7 +149,7 @@ {:else}
{#each allAlbums as album} - + {#if album.coverPhoto}
- {#snippet header()} -
-

{album.title}

- - {#if album.description} -

{album.description}

- {/if} - -
- {#if album.date} - 📅 {formatDate(album.date)} - {/if} - {#if album.location} - 📍 {album.location} - {/if} - 📷 {album.photos?.length || 0} photo{(album.photos?.length || 0) !== 1 - ? 's' - : ''} -
-
- {/snippet} - {#if album.content}
- {@html renderEdraContent(album.content)} + {@html renderEdraContent(album.content, { albumSlug: album.slug })}
{:else} @@ -199,34 +175,6 @@ {/if}
-{:else if type === 'photo' && photo} -
- -
- -
- -
- {photo.title -
- -
- {#if photo.title} -

{photo.title}

- {/if} - - {#if photo.caption || photo.description} -

{photo.caption || photo.description}

- {/if} - - {#if photo.exifData} -
- -
- {/if} -
-
-
{/if}