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 1/6] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=88=91=E7=9A=84?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E6=A8=A1=E6=9D=BF=EF=BC=8C=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=8F=92=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 @@ - From 2ac2c5579f86abcd7708ced97c5a5da6d68cce19 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 12 Oct 2023 00:27:45 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=98=E5=8C=96loading=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/fcircle.html | 4 +- templates/modules/head.html | 2 +- templates/modules/layouts/layout.html | 50 +++++++++++------ templates/modules/loading-box.html | 78 +++++++++------------------ 4 files changed, 62 insertions(+), 72 deletions(-) diff --git a/templates/fcircle.html b/templates/fcircle.html index fbd147e0..42b06741 100644 --- a/templates/fcircle.html +++ b/templates/fcircle.html @@ -55,8 +55,8 @@
以下内容自动生成,未经过审核
- - diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 70b7d0e1..4189a2ae 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -26,7 +26,7 @@ -
+
@@ -68,6 +68,38 @@ + +
+ + +
+ + + + + + + + + + @@ -76,12 +108,6 @@ - - - - - @@ -91,9 +117,6 @@ - - - @@ -125,15 +148,8 @@ -
- - -
- - - - -
+
\ No newline at end of file From f041477c109223f87c404c526ac804a04293acc0 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 12 Oct 2023 00:32:47 +0800 Subject: [PATCH 4/6] =?UTF-8?q?pace=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/libs/pace/pace.min.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 templates/assets/libs/pace/pace.min.js diff --git a/templates/assets/libs/pace/pace.min.js b/templates/assets/libs/pace/pace.min.js new file mode 100644 index 00000000..cc6cd490 --- /dev/null +++ b/templates/assets/libs/pace/pace.min.js @@ -0,0 +1,6 @@ +/*! + * pace.js v1.2.4 + * https://github.com/CodeByZach/pace/ + * Licensed MIT 漏 HubSpot, Inc. + */ +(function(){function o(t,e){return function(){return t.apply(e,arguments)}}var u,c,i,s,n,y,t,l,v,r,a,p,e,h,w,b,f,g,d,m,k,S,q,L,x,P,T,R,j,O,E,M,A,C,N,_,F,U,W,X,D,H,I,z,G,B,J=[].slice,K={}.hasOwnProperty,Q=function(t,e){for(var n in e)K.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},V=[].indexOf||function(t){for(var e=0,n=this.length;e\n
\n\n
',null!=t.firstChild?t.insertBefore(this.el,t.firstChild):t.appendChild(this.el)}return this.el},$.prototype.finish=function(){var t=this.getElement();return t.className=t.className.replace("pace-active","pace-inactive")},$.prototype.update=function(t){return this.progress=t,y.trigger("progress",t),this.render()},$.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(t){n=t}return this.el=void 0},$.prototype.render=function(){var t,e,n,r,s,o,i;if(null==document.querySelector(T.target))return!1;for(t=this.getElement(),r="translate3d("+this.progress+"%, 0, 0)",s=0,o=(i=["webkitTransform","msTransform","transform"]).length;sT.eventLag.sampleCount&&o.shift(),e=h(o),++s>=T.eventLag.minSamples&&ethis.progress&&(this.progress+=this.catchup*t),e=1-Math.pow(this.progress/100,T.easeFactor),this.progress+=e*this.rate*t,this.progress=Math.min(this.lastProgress+T.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},v=it,b=e=_=w=E=N=null,y.running=!1,q=function(){if(T.restartOnPushState)return y.restart()},null!=window.history.pushState&&(I=window.history.pushState,window.history.pushState=function(){return q(),I.apply(window.history,arguments)}),null!=window.history.replaceState&&(G=window.history.replaceState,window.history.replaceState=function(){return q(),G.apply(window.history,arguments)}),l={ajax:u,elements:k,document:B,eventLag:Q},(x=function(){var t,e,n,r,s,o,i,a;for(y.sources=N=[],e=0,r=(o=["ajax","elements","document","eventLag"]).length;e Date: Thu, 12 Oct 2023 00:53:32 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BC=98=E5=8C=96loading=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/layouts/layout.html | 17 ----------------- templates/modules/loading-box.html | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 4189a2ae..db6df69e 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -68,23 +68,6 @@ -
diff --git a/templates/modules/loading-box.html b/templates/modules/loading-box.html index 4c4c8495..42e4e60d 100644 --- a/templates/modules/loading-box.html +++ b/templates/modules/loading-box.html @@ -85,6 +85,22 @@
+
From 339185e44614a8b44f89b30e10a16c73159effbc Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 12 Oct 2023 01:09:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/head.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/modules/head.html b/templates/modules/head.html index 60ecba9c..9e0420a7 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -165,10 +165,6 @@ - - - -