From baa936894da81210e4449a41b699e5de8735120e Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 24 Jun 2019 01:59:32 +0200 Subject: [PATCH] Display single images properly --- src/views/tweet.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/tweet.nim b/src/views/tweet.nim index 944063b..0e8c188 100644 --- a/src/views/tweet.nim +++ b/src/views/tweet.nim @@ -31,8 +31,9 @@ # #proc renderMediaGroup(tweet: Tweet): string = #let groups = if tweet.photos.len > 2: tweet.photos.distribute(2) else: @[tweet.photos] +#let display = if groups.len == 1 and groups[0].len == 1: "display: table-caption;" else: "" #var first = true -
+
#for photos in groups: #let margin = if not first: "margin-top: .25em;" else: "" #let flex = if photos.len > 1 or groups.len > 1: "display: flex;" else: ""