From eff8837eb94682e54cda3009af94c7e91d187379 Mon Sep 17 00:00:00 2001 From: Robert Goniszewski Date: Sat, 9 Mar 2024 14:31:15 +0100 Subject: [PATCH 1/4] chore: prepare screenshot URL Signed-off-by: Robert Goniszewski --- src/routes/+layout.server.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index a7c6295..49015d0 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -101,6 +101,7 @@ export const load = (async ({ locals, url }) => { ...bookmark, icon: getFileUrl('bookmarks', bookmark.id, bookmark.icon), main_image: getFileUrl('bookmarks', bookmark.id, bookmark.main_image), + screenshot: getFileUrl('bookmarks', bookmark.id, bookmark.screenshot), ...bookmark.expand })) ), From cf42f941bba8e3ec745bb3fc2d5739b0eb7245c4 Mon Sep 17 00:00:00 2001 From: Robert Goniszewski Date: Sat, 9 Mar 2024 14:32:09 +0100 Subject: [PATCH 2/4] feat: if available, display screenshot on mouseover; use screenshot if main image is not available Signed-off-by: Robert Goniszewski --- .../BookmarkCard/BookmarkCard.svelte | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/lib/components/BookmarkCard/BookmarkCard.svelte b/src/lib/components/BookmarkCard/BookmarkCard.svelte index eb4f08b..58c1422 100644 --- a/src/lib/components/BookmarkCard/BookmarkCard.svelte +++ b/src/lib/components/BookmarkCard/BookmarkCard.svelte @@ -1,26 +1,24 @@ @@ -52,34 +47,42 @@ {/if}

{$bookmark.domain}

-
-