From 0d89072f57b3156a9ac773e6ef5ed9cff8b5f7fe Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Fri, 24 Jul 2026 16:40:28 +1000 Subject: [PATCH] update style! --- links/templates/links/link_list.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/links/templates/links/link_list.html b/links/templates/links/link_list.html index fc9e343..6790295 100644 --- a/links/templates/links/link_list.html +++ b/links/templates/links/link_list.html @@ -461,9 +461,12 @@ if (!img) return; const box = img.getAttribute('data-box'); const timestamp = new Date().getTime(); - // The API rejects dimensions below 300px; portrait cards: height >= width. - const width = Math.max(img.offsetWidth || 800, 300); - const height = Math.max(img.offsetHeight || 1200, width, 300); + // Request the same fixed high-resolution size used for the initial page + // load (600x800), regardless of the card's small on-screen CSS size — + // the .fan-card is only ~100-170px wide, so using img.offsetWidth/Height + // here fetched a much smaller/blurrier image than the initial fetch did. + const width = 600; + const height = 800; const newUrl = `/api/images/random/${width}/${height}/?fit=crop&v=${timestamp}&box=${box}`; const newImg = new Image();