From 1ad276fa5bc279baec7c050bb72aab124160dafe Mon Sep 17 00:00:00 2001 From: nineya <361654768@qq.com> Date: Fri, 29 Dec 2023 17:36:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(thumbnail):=20=E4=BF=AE=E5=A4=8D=E5=BD=92?= =?UTF-8?q?=E6=A1=A3=E5=92=8C=E6=96=87=E7=AB=A0=E9=A1=B5=E9=9D=A2=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=BC=A9=E7=95=A5=E5=9B=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archives.ftl | 5 +++-- template/main/article.ftl | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/archives.ftl b/archives.ftl index 1b9fd19..f603cf4 100644 --- a/archives.ftl +++ b/archives.ftl @@ -6,10 +6,11 @@
${archive.year?c}
<#list archive.posts as post> + <#assign thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>
- <#if post.thumbnail?? && post.thumbnail!=''> + <#if thumbnail!=''> - ${post.title!} + ${post.title!}
diff --git a/template/main/article.ftl b/template/main/article.ftl index a9cfdcd..0e0e257 100644 --- a/template/main/article.ftl +++ b/template/main/article.ftl @@ -1,7 +1,8 @@ <#macro article post,commentType> - <#if post.thumbnail?? && post.thumbnail!=''> + <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))> + <#if thumbnail!=''>
-
+
<#if categories?? && categories?size gt 0>
<#list categories as category> @@ -31,7 +32,7 @@
- <#if !post.thumbnail?? || post.thumbnail==''> + <#if thumbnail==''>

${post.title!}