diff --git a/settings.yaml b/settings.yaml index 686335f0..ea796a49 100644 --- a/settings.yaml +++ b/settings.yaml @@ -478,3 +478,8 @@ spec: value: true - label: 关闭 value: false + - $formkit: url + name: img_error + label: 图片加载失败图 + help: 图片加载失败时显示的图片 + placeholder: 请输入图片 url \ No newline at end of file diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index a6cfac0a..c50264ce 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -282,3 +282,12 @@ window.onscroll = function () { percent(); }; + + +function imgError(url) { + $("img").on("error", function () { + $(this).attr("src", url); + }); +} + + diff --git a/templates/category.html b/templates/category.html index ac97d343..65ff86f1 100644 --- a/templates/category.html +++ b/templates/category.html @@ -17,9 +17,9 @@ 首页
+ th:id="${categoryItem.spec.displayName}">
@@ -36,7 +36,8 @@
- +
@@ -50,7 +51,7 @@ th:href="${post.status.permalink}" th:text="${post.spec.title}" th:title="${post.spec.title}">
-
diff --git a/templates/modules/widgets/aside/recent-posts.html b/templates/modules/widgets/aside/recent-posts.html index db3a3238..48b626b8 100644 --- a/templates/modules/widgets/aside/recent-posts.html +++ b/templates/modules/widgets/aside/recent-posts.html @@ -6,7 +6,7 @@