From a3c60e83caa0e905c4ec9f13afd0ba19edb93be2 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 19 Aug 2023 19:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=87=92=E5=8A=A0=E8=BD=BD-?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 11 ++++ templates/album.html | 4 +- templates/macro/bangumi-item.html | 2 +- templates/macro/content-links.html | 14 ++--- templates/modules/layouts/layout.html | 2 +- templates/modules/post-list.html | 2 +- templates/modules/post/relatedPosts.html | 4 +- .../modules/widgets/about-widgets/game.html | 2 +- .../modules/widgets/aside/friend-link.html | 4 +- templates/modules/widgets/aside/profile.html | 6 +- .../modules/widgets/aside/recent-posts.html | 2 +- templates/modules/widgets/banner-group.html | 60 +++++++++---------- templates/modules/widgets/top-group.html | 4 +- templates/moments.html | 2 +- templates/post.html | 4 +- 15 files changed, 67 insertions(+), 56 deletions(-) diff --git a/settings.yaml b/settings.yaml index 0e75c752..0ea41a87 100644 --- a/settings.yaml +++ b/settings.yaml @@ -2667,14 +2667,25 @@ spec: value: enable: true errorImg: "/themes/theme-hao/assets/images/404.gif" + loadingImg: /themes/theme-hao/assets/images/404s.gif children: - $formkit: radio name: enable + id: enable + key: enable options: - label: 启用 value: true - label: 禁用 value: false + - $formkit: attachment + name: loadingImg + id: loadingImg + key: loadingImg + if: $get(enable).value + label: 加载图片 + validation: required + placeholder: 请输入图片 url - $formkit: attachment name: errorImg label: 图片加载失败图 diff --git a/templates/album.html b/templates/album.html index 2f333b39..18dde1ca 100644 --- a/templates/album.html +++ b/templates/album.html @@ -25,7 +25,7 @@
@@ -46,7 +46,7 @@
@@ -112,7 +112,7 @@
@@ -120,7 +120,7 @@ @@ -130,7 +130,7 @@ @@ -138,7 +138,7 @@ @@ -148,7 +148,7 @@ @@ -156,7 +156,7 @@ @@ -166,7 +166,7 @@ @@ -174,7 +174,7 @@ @@ -184,7 +184,7 @@ @@ -192,7 +192,7 @@ @@ -202,7 +202,7 @@ @@ -210,7 +210,7 @@ @@ -220,7 +220,7 @@ @@ -228,7 +228,7 @@ @@ -238,7 +238,7 @@ @@ -246,7 +246,7 @@ @@ -256,7 +256,7 @@ @@ -264,7 +264,7 @@ @@ -283,7 +283,7 @@ @@ -294,7 +294,7 @@ diff --git a/templates/modules/widgets/top-group.html b/templates/modules/widgets/top-group.html index 862482c7..1b7c760f 100644 --- a/templates/modules/widgets/top-group.html +++ b/templates/modules/widgets/top-group.html @@ -17,7 +17,7 @@ th:with=' img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}' th:alt="${post.spec.title}" th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''" - th:src="${isLazyload ? dataImage : img}" + th:src="${isLazyload ? loadingImg : img}" th:data-lazy-src="${ isLazyload ? img : ''}" /> @@ -44,7 +44,7 @@ th:with='img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}' th:alt="${post.spec.title}" th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''" - th:src="${isLazyload ? dataImage : img}" + th:src="${isLazyload ? loadingImg : img}" th:data-lazy-src="${ isLazyload ? img : ''}" /> diff --git a/templates/moments.html b/templates/moments.html index 6670d0b5..3bd88253 100644 --- a/templates/moments.html +++ b/templates/moments.html @@ -32,7 +32,7 @@
diff --git a/templates/post.html b/templates/post.html index a13eedb2..f5ce8c5e 100644 --- a/templates/post.html +++ b/templates/post.html @@ -125,7 +125,7 @@ cover
@@ -138,7 +138,7 @@ cover