From be184d8faf7fc41a15d276d49be6e39075f92351 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 22 Apr 2026 22:31:35 +0200 Subject: [PATCH] feat(frontend): add DocumentThumbnail shared 60x84 tile component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renders the document thumbnail with object-cover + object-top so letter salutations stay visible, empty alt (title nearby is the accessible name), loading=lazy, decoding=async, and dark:mix-blend-multiply for dark mode. Falls back to a PDF icon when thumbnailKey is null — legacy documents, unsupported content types, or transient failures all land here. Refs #307 Co-Authored-By: Claude Opus 4.7 --- .../lib/components/DocumentThumbnail.svelte | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 frontend/src/lib/components/DocumentThumbnail.svelte diff --git a/frontend/src/lib/components/DocumentThumbnail.svelte b/frontend/src/lib/components/DocumentThumbnail.svelte new file mode 100644 index 00000000..d35cfbf7 --- /dev/null +++ b/frontend/src/lib/components/DocumentThumbnail.svelte @@ -0,0 +1,51 @@ + + + +
+ {#if url} + + {:else} + + {/if} +