From cfe0fe791d5e9fb24f76905cd6f76ff8d2e884ba Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 19 Aug 2023 03:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=87=92=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 | 19 ++ templates/album.html | 11 +- templates/macro/content-links.html | 35 +-- templates/modules/head.html | 2 +- templates/modules/layouts/layout.html | 4 +- templates/modules/post-list.html | 5 +- templates/modules/post/relatedPosts.html | 10 +- .../modules/widgets/about-widgets/game.html | 5 +- .../modules/widgets/aside/friend-link.html | 8 +- templates/modules/widgets/aside/profile.html | 15 +- .../modules/widgets/aside/recent-posts.html | 5 +- templates/modules/widgets/banner-group.html | 210 +++++++++++++++--- templates/modules/widgets/top-group.html | 12 +- templates/moments.html | 5 +- templates/photos.html | 10 +- templates/post.html | 10 +- 16 files changed, 282 insertions(+), 84 deletions(-) diff --git a/settings.yaml b/settings.yaml index abbfc9cd..0e75c752 100644 --- a/settings.yaml +++ b/settings.yaml @@ -2661,6 +2661,25 @@ spec: validation: required value: 'https://npm.onmicrosoft.cn/hao-theme-static@1.3.0/templates/assets' help: '默认为npmJs的onmicrosoft加速地址,如果你有自己的cdn地址(请确保链接下assets文件夹下主题静态资源文件),可以填写,否则请勿修改! ' + - $formkit: group + name: vanillaLazyload + label: 懒加载 + value: + enable: true + errorImg: "/themes/theme-hao/assets/images/404.gif" + children: + - $formkit: radio + name: enable + options: + - label: 启用 + value: true + - label: 禁用 + value: false + - $formkit: attachment + name: errorImg + label: 图片加载失败图 + validation: required + placeholder: 请输入图片 url - $formkit: group name: diytitle label: 动态标题 diff --git a/templates/album.html b/templates/album.html index 2c8e9af3..2f333b39 100644 --- a/templates/album.html +++ b/templates/album.html @@ -24,9 +24,10 @@
+ th:src="${isLazyload ? dataImage : #annotations.get(group, 'cover')}" + th:data-lazy-src="${ isLazyload ? #annotations.get(group, 'cover') : ''}" + >

@@ -44,9 +45,11 @@
@@ -87,18 +95,19 @@ + th:src="${isLazyload ? dataImage : img}" + th:data-lazy-src="${ isLazyload ? img : ''}">
+ th:src="${isLazyload ? dataImage : link.spec.logo}" + th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}">
@@ -141,9 +150,9 @@
[[${link.spec.displayName}]]