diff --git a/web/src/lib/components/PhotoThumbnail.svelte b/web/src/lib/components/PhotoThumbnail.svelte new file mode 100644 index 0000000000..8844f5f428 --- /dev/null +++ b/web/src/lib/components/PhotoThumbnail.svelte @@ -0,0 +1,37 @@ + + +{#if !loaded && asset.thumbhash} + +{/if} + + (loaded = true)} +/> diff --git a/web/src/lib/components/PhotoTimeline.svelte b/web/src/lib/components/PhotoTimeline.svelte new file mode 100644 index 0000000000..6442c3d666 --- /dev/null +++ b/web/src/lib/components/PhotoTimeline.svelte @@ -0,0 +1,249 @@ + + + + +
+
+ +
+ + {#each visibleSections as section (section.timeBucket)} +
+ + + {#if section.status === 'loaded' && section.layout} + {#each section.assets as asset, i (asset.id)} + {@const box = section.layout.boxes[i]} + {#if isInRange(section.start + box.top, scrollEl.scrollTop - VIEWPORT_PADDING, scrollEl.scrollTop + scrollEl.clientHeight + VIEWPORT_PADDING)} +
+ + +
+ {/if} + {/each} + {/if} +
+ {/each} +
+ +
+
diff --git a/web/src/routes/photos2/[[assetId=id]]/+page.svelte b/web/src/routes/photos2/[[assetId=id]]/+page.svelte new file mode 100644 index 0000000000..44336ceb48 --- /dev/null +++ b/web/src/routes/photos2/[[assetId=id]]/+page.svelte @@ -0,0 +1,8 @@ + + + + + diff --git a/web/src/routes/photos2/[[assetId=id]]/+page.ts b/web/src/routes/photos2/[[assetId=id]]/+page.ts new file mode 100644 index 0000000000..097f272bfb --- /dev/null +++ b/web/src/routes/photos2/[[assetId=id]]/+page.ts @@ -0,0 +1,14 @@ +import { authenticate } from '$lib/utils/auth'; +import { getFormatter } from '$lib/utils/i18n'; +import type { PageLoad } from './$types'; + +export const load = (async () => { + await authenticate(); + const $t = await getFormatter(); + + return { + meta: { + title: $t('photos'), + }, + }; +}) satisfies PageLoad;