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}' + />