From 683c052036b268028f0ecae020a1519bc586516d Mon Sep 17 00:00:00 2001 From: Zed Date: Fri, 13 May 2022 20:31:42 +0200 Subject: [PATCH] Fix placeholders in photo rail --- src/views/profile.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/profile.nim b/src/views/profile.nim index 9eda46d..73ce59d 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -78,8 +78,11 @@ proc renderPhotoRail(profile: Profile): VNode = tdiv(class="photo-rail-grid"): for i, photo in profile.photoRail: if i == 16: break + let photoSuffix = + if "format" in photo.url or "placeholder" in photo.url: "" + else: ":thumb" a(href=(&"/{profile.user.username}/status/{photo.tweetId}#m")): - genImg(photo.url & (if "format" in photo.url: "" else: ":thumb")) + genImg(photo.url & photoSuffix) proc renderBanner(banner: string): VNode = buildHtml():