From b9c257f1b458191d43a7d0bfeb0695d5ad9f1adf Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Wed, 11 Oct 2023 23:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=88=91=E7=9A=84=E8=A3=85?= =?UTF-8?q?=E5=A4=87=E6=A8=A1=E6=9D=BF=EF=BC=8C=E6=94=B9=E4=B8=BA=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annotation-setting.yaml | 38 +++++++++++++++ templates/{equipment.html => equipments.html} | 47 +++++++++---------- templates/error/404.html | 2 +- templates/error/500.html | 2 +- templates/index.html | 2 +- templates/modules/widgets/aside/comments.html | 2 +- templates/moments.html | 6 +-- templates/new_comment.html | 2 +- templates/photos.html | 6 +-- theme.yaml | 4 -- 10 files changed, 72 insertions(+), 39 deletions(-) rename templates/{equipment.html => equipments.html} (85%) diff --git a/annotation-setting.yaml b/annotation-setting.yaml index fa28cd3e..74790770 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -135,3 +135,41 @@ spec: - $formkit: "textarea" name: "description" label: "分组描述" + +--- + +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + generateName: annotation-setting- +spec: + targetRef: + group: core.halo.run + kind: EquipmentGroup + formSchema: + - $formkit: "textarea" + name: "description" + label: "分组描述" + +--- + +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + generateName: annotation-setting- +spec: + targetRef: + group: core.halo.run + kind: Equipment + formSchema: + - $formkit: "text" + name: "model" + label: "装备型号/版本" + - $formkit: "text" + name: "button" + label: "左下角按钮显示文字" + value: "详情" + - $formkit: "text" + name: "link" + label: "左下角按钮跳转链接" + diff --git a/templates/equipment.html b/templates/equipments.html similarity index 85% rename from templates/equipment.html rename to templates/equipments.html index 11348790..8582fe55 100644 --- a/templates/equipment.html +++ b/templates/equipments.html @@ -1,11 +1,11 @@ + th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'equipments',title = ${title + ' | ' + site.title}, head = ~{::head},_title = ${title})}"> - @@ -14,7 +14,7 @@
@@ -24,36 +24,35 @@ detail = ${theme.config.equipment.detail}, buttonUrl = '', buttonTitle = '')}" >
-
- +
+
-

[[${category.category_name}]]

-
[[${category.description}]]
-
+

[[${group.spec.displayName}]]

+
[[${#annotations.get(group, 'description')}]]
+
+ th:alt="${equipment.spec.displayName}" + th:src="${isLazyload ? loadingImg : equipment.spec.url}" + th:data-lazy-src="${ isLazyload ? equipment.spec.url : ''}">
- [[${equipment.name}]] + th:onclick="rm.rightmenuCopyText([[${equipment.spec.displayName}]]);btf.snackbarShow('已复制装备名称');"> + [[${equipment.spec.displayName}]]
-
[[${equipment.model}]] +
[[${#annotations.get(equipment, 'model')}]]
- [[${equipment.description}]] + [[${equipment.spec.description}]]
- [[${equipment.button}]] + [[${#annotations.get(equipment, 'button')}]] @@ -197,8 +196,8 @@ + name = 'equipment', + allowComment = true)}"/>
diff --git a/templates/error/404.html b/templates/error/404.html index d4c32ea4..a5f50e03 100644 --- a/templates/error/404.html +++ b/templates/error/404.html @@ -1,5 +1,5 @@ - diff --git a/templates/error/500.html b/templates/error/500.html index 23a64196..4c91681d 100644 --- a/templates/error/500.html +++ b/templates/error/500.html @@ -1,5 +1,5 @@ - diff --git a/templates/index.html b/templates/index.html index 451160e1..ff1b5d33 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,7 +5,7 @@ diff --git a/templates/modules/widgets/aside/comments.html b/templates/modules/widgets/aside/comments.html index 6b72aeee..592ee767 100644 --- a/templates/modules/widgets/aside/comments.html +++ b/templates/modules/widgets/aside/comments.html @@ -13,7 +13,7 @@ th:with="newcommentnumber = ${#conversions.convert(theme.config.sidebar.newcomment.newcommentnumber, 'java.lang.Integer') >= 0 ? theme.config.sidebar.newcommentnumber : 5}">
diff --git a/templates/moments.html b/templates/moments.html index b3ee604a..06828232 100644 --- a/templates/moments.html +++ b/templates/moments.html @@ -1,8 +1,8 @@ + th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'moments',title = ${title + ' | ' + site.title}, head = ~{::head}, _title = ${title})}"> -
diff --git a/templates/new_comment.html b/templates/new_comment.html index 31c07154..5cfc3164 100644 --- a/templates/new_comment.html +++ b/templates/new_comment.html @@ -53,7 +53,7 @@