From 1533b8218da1d24055b0d44eb80605ad5871623c Mon Sep 17 00:00:00 2001 From: Airbo ZH Date: Thu, 9 Feb 2023 16:44:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=92=8C=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E7=89=87=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/post-list.html | 7 ++++--- templates/modules/widgets/top-group.html | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/templates/modules/post-list.html b/templates/modules/post-list.html index 0c920766..c910d56c 100644 --- a/templates/modules/post-list.html +++ b/templates/modules/post-list.html @@ -2,8 +2,8 @@ - + th:with='postItems=${posts.items}, + postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg : theme.config.layout.postRandomImg+"?"}'>
+ th:src='${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}'> +
diff --git a/templates/modules/widgets/top-group.html b/templates/modules/widgets/top-group.html index 55772882..c32f71b9 100644 --- a/templates/modules/widgets/top-group.html +++ b/templates/modules/widgets/top-group.html @@ -2,7 +2,9 @@ -
+
@@ -12,7 +14,8 @@ + th:src='${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}' + />