From 3adab898dea3aee01080ae760562de9f76cc33ad Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Tue, 1 Aug 2023 22:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=AE=98=E6=96=B9=E5=8F=8B?= =?UTF-8?q?=E8=81=941.3=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annotation-setting.yaml | 53 ++++++++++++++++++- templates/macro/content-links.html | 25 +++++---- .../modules/widgets/aside/friend-link.html | 8 +-- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/annotation-setting.yaml b/annotation-setting.yaml index d3cfd0c8..7eaecfe4 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -9,4 +9,55 @@ spec: formSchema: - $formkit: "text" name: "icon" - label: "图标" \ No newline at end of file + label: "图标" + +--- + +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + generateName: annotation-setting- +spec: + targetRef: + group: "core.halo.run" + kind: LinkGroup + formSchema: + - $formkit: "radio" + name: "displayStyle" + label: "分组方式" + value: default + options: + - label: 默认 + value: default + - label: 美化 + value: beautify + - label: 失联 + value: deprecated + - $formkit: "textarea" + name: "description" + label: "描述" + value: "" + +--- + +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + generateName: annotation-setting- +spec: + targetRef: + group: "core.halo.run" + kind: Link + formSchema: + - $formkit: "attachment" + name: "siteshot" + label: "背景" + value: "" + - $formkit: "text" + name: "label" + label: "标签" + value: "" + - $formkit: "color" + name: "labelColor" + value: "#425AEF" + label: "标签颜色" \ No newline at end of file diff --git a/templates/macro/content-links.html b/templates/macro/content-links.html index 8a08dda6..00bffa8d 100644 --- a/templates/macro/content-links.html +++ b/templates/macro/content-links.html @@ -74,19 +74,18 @@ [[${group.spec.displayName}]] ([[${group.links.size}]]) - - + -
- [[${link.spec.label}]] + [[${link.metadata.annotations.label}]] + th:src="@{${#strings.isEmpty(link.metadata.annotations.siteshot) ? link.spec.logo : link.metadata.annotations.siteshot}}">
+
-