适配官方友联1.3插件
This commit is contained in:
parent
78abd17728
commit
3adab898de
|
@ -10,3 +10,54 @@ spec:
|
|||
- $formkit: "text"
|
||||
name: "icon"
|
||||
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: "标签颜色"
|
|
@ -74,19 +74,18 @@
|
|||
[[${group.spec.displayName}]] ([[${group.links.size}]])
|
||||
</h2>
|
||||
|
||||
<div class="flink-desc">[[${group.spec.description}]]</div>
|
||||
|
||||
<div class="flink-desc">[[${group.metadata.annotations.description}]]</div>
|
||||
|
||||
<!-- 第一个,使用卡片展示 -->
|
||||
<div th:if="${#strings.equals(group.spec.displayStyle,'beautify') && not #lists.isEmpty(group.spec.displayStyle)}"
|
||||
<div th:if="${#strings.equals(group.metadata.annotations.displayStyle,'beautify') && not #lists.isEmpty(group.links)}"
|
||||
class="site-card-group">
|
||||
<div class="site-card" th:each="link : ${group.links}">
|
||||
<span th:if="${not #lists.isEmpty(link.spec.label)}"
|
||||
th:style="'background-color:' + ${link.spec.labelColor}"
|
||||
class="site-card-tag">[[${link.spec.label}]]</span>
|
||||
<span th:if="${not #strings.isEmpty(link.metadata.annotations.label)}"
|
||||
th:style="'background-color:' + ${link.metadata.annotations.labelColor}"
|
||||
class="site-card-tag">[[${link.metadata.annotations.label}]]</span>
|
||||
<a class="img" target="_blank" th:href="${link.spec.url}" th:title="${link.spec.displayName}">
|
||||
<img class="flink-avatar" style="pointer-events: none;" th:alt="${link.spec.displayName}"
|
||||
th:src="@{${#strings.isEmpty(link.spec.siteshot) ? link.spec.logo : link.spec.siteshot}}">
|
||||
th:src="@{${#strings.isEmpty(link.metadata.annotations.siteshot) ? link.spec.logo : link.metadata.annotations.siteshot}}">
|
||||
</a>
|
||||
|
||||
<a class="info cf-friends-link" target="_blank" th:href="${link.spec.url}"
|
||||
|
@ -103,15 +102,15 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flink-list"
|
||||
th:if="${#strings.equals(group.spec.displayStyle,'default') && not #lists.isEmpty(group.spec.displayStyle)}">
|
||||
th:if="${#strings.equals(group.metadata.annotations.displayStyle,'default') && not #lists.isEmpty(group.links)}">
|
||||
<div class="flink-list-item" th:each="link : ${group.links}">
|
||||
<span th:if="${not #lists.isEmpty(link.spec.label)}"
|
||||
th:style="'background-color:' + ${link.spec.labelColor}"
|
||||
class="site-card-tag">[[${link.spec.label}]]</span>
|
||||
<span th:if="${not #strings.isEmpty(link.metadata.annotations.label)}"
|
||||
th:style="'background-color:' + ${link.metadata.annotations.labelColor}"
|
||||
class="site-card-tag">[[${link.metadata.annotations.label}]]</span>
|
||||
<a class="cf-friends-link" rel="external nofollow" target="_blank" th:href="${link.spec.url}"
|
||||
th:title="${link.spec.displayName}">
|
||||
<img class="flink-avatar cf-friends-avatar" th:alt="${link.spec.displayName}"
|
||||
|
@ -127,7 +126,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flink-list mini"
|
||||
th:if="${#strings.equals(group.spec.displayStyle,'deprecated') && not #lists.isEmpty(group.spec.displayStyle)}">
|
||||
th:if="${#strings.equals(group.metadata.annotations.displayStyle,'deprecated') && not #lists.isEmpty(group.links)}">
|
||||
<div class="flink-list-item" th:each="link : ${group.links}">
|
||||
<a class="cf-friends-link" rel="external nofollow" target="_blank" th:href="${link.spec.url}"
|
||||
th:title="${link.spec.displayName}">
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
th:if="${pluginFinder.available('PluginLinks')}"
|
||||
th:with="groups = ${linkFinder.groupBy()}">
|
||||
<th:block th:each="group,iterStat : ${groups}">
|
||||
<details th:if="${group.spec.displayStyle != 'deprecated' && not #lists.isEmpty(group.spec.displayStyle)}"
|
||||
<details th:if="${group.metadata.annotations.displayStyle != 'deprecated' && not #strings.isEmpty(group.metadata.annotations.displayStyle) && not #lists.isEmpty(group.links)}"
|
||||
class="card-friend-class-name">
|
||||
<summary class="card-friend-class-desc" th:title="${group.spec.description}">
|
||||
<summary class="card-friend-class-desc" th:title="${group.metadata.annotations.description}">
|
||||
<sapn>[[${group.spec.displayName}]]</sapn>
|
||||
<sapn>[[${group.links.size}]]</sapn>
|
||||
</summary>
|
||||
|
@ -25,9 +25,9 @@
|
|||
</div>
|
||||
</a>
|
||||
</details>
|
||||
<details th:if="${#strings.equals(group.spec.displayStyle,'deprecated') && not #lists.isEmpty(group.spec.displayStyle)}"
|
||||
<details th:if="${#strings.equals(group.metadata.annotations.displayStyle,'deprecated') && not #lists.isEmpty(group.links)}"
|
||||
class="card-friend-class-name">
|
||||
<summary class="card-friend-class-desc" th:title="${group.spec.description}">
|
||||
<summary class="card-friend-class-desc" th:title="${group.metadata.annotations.description}">
|
||||
<sapn>[[${group.spec.displayName}]]</sapn>
|
||||
<sapn>[[${group.links.size}]]</sapn>
|
||||
</summary>
|
||||
|
|
Loading…
Reference in New Issue