From 6ae38fe04dda63b1f89f309cd37f2025aab1d8da Mon Sep 17 00:00:00 2001 From: perennial Date: Fri, 8 Nov 2024 14:17:32 +1100 Subject: [PATCH] artwork: avoid RecentWorks newline --- assets/views/artwork.jet.html | 27 ++++++++++++++++++++------- i18n/locale/en/template.json | 1 - 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/assets/views/artwork.jet.html b/assets/views/artwork.jet.html index fdf5c87..f3d3c41 100644 --- a/assets/views/artwork.jet.html +++ b/assets/views/artwork.jet.html @@ -35,14 +35,27 @@
- {{- range .Illust.RecentWorks }} - {* NOTE: indivisble col-7 to create a visible affordance *} -
-
- {{ include "fragments/thumbnail-dt" . }} -
{{ include "fragments/thumbnail-tt" . }}
+ {* we only render 19 items if there are 20 RecentWorks to avoid a newline with only the "See more" button on large devices *} + {{- if len(.Illust.RecentWorks) == 20 }} + {{- range .Illust.RecentWorks[:19] }} + {* NOTE: indivisble col-7 to create a visible affordance *} +
+
+ {{ include "fragments/thumbnail-dt" . }} +
{{ include "fragments/thumbnail-tt" . }}
+
-
+ {{- end }} + {{- else }} + {{- range .Illust.RecentWorks }} + {* NOTE: indivisble col-7 to create a visible affordance *} +
+
+ {{ include "fragments/thumbnail-dt" . }} +
{{ include "fragments/thumbnail-tt" . }}
+
+
+ {{- end }} {{- end }} {* See more button *}
diff --git a/i18n/locale/en/template.json b/i18n/locale/en/template.json index 6d1610b..5518695 100644 --- a/i18n/locale/en/template.json +++ b/i18n/locale/en/template.json @@ -143,7 +143,6 @@ "assets/views/index.jet.html:MnsvADadEqk": "Newest articles on pixivision", "assets/views/index.jet.html:QX9SfhF5thM": "Nothing here yet—find a user to follow!", "assets/views/index.jet.html:Sccoo133FQI": "All", - "assets/views/index.jet.html:X9iU_H9c1Ss": "You are logged in.", "assets/views/index.jet.html:lEVH3Ram904": "Newest works", "assets/views/index.jet.html:lv5wuj1vx98": "Latest works by followed", "assets/views/index.jet.html:n7zdClpaR18": "Recommended illustrations tagged",