commit
a2e0f97e83
|
@ -58,3 +58,24 @@ spec:
|
|||
name: "labelColor"
|
||||
value: "#425AEF"
|
||||
label: "标签颜色"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1alpha1
|
||||
kind: AnnotationSetting
|
||||
metadata:
|
||||
generateName: annotation-setting-
|
||||
spec:
|
||||
targetRef:
|
||||
group: "core.halo.run"
|
||||
kind: PhotoGroup
|
||||
formSchema:
|
||||
- $formkit: "attachment"
|
||||
name: "cover"
|
||||
label: "分组图片"
|
||||
- $formkit: "attachment"
|
||||
name: "background"
|
||||
label: "分组顶部 banner 图片"
|
||||
- $formkit: "textarea"
|
||||
name: "description"
|
||||
label: "分组描述"
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "halo-theme-hao",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -234,21 +234,64 @@ spec:
|
|||
placeholder: 请输入小标题
|
||||
value: 更多信息请关注 GitHub
|
||||
help: 支持 HTML 语法
|
||||
- $formkit: repeater
|
||||
name: categoryGroup
|
||||
min: 3
|
||||
max: 3
|
||||
value:
|
||||
- title: "必看精选"
|
||||
icon: "iconfont icon-book"
|
||||
url: "/"
|
||||
colorOneLight: "#358bff"
|
||||
colorTwoLight: "#15c6ff"
|
||||
colorOneDark: "#0653b8"
|
||||
colorTwoDark: "#2fcbff"
|
||||
- title: "热门文章"
|
||||
icon: "iconfont icon-burn"
|
||||
url: "/"
|
||||
colorOneLight: "#ff6655"
|
||||
colorTwoLight: "#ffbf37"
|
||||
colorOneDark: "#e22a16"
|
||||
colorTwoDark: "#da980c"
|
||||
- title: "实用教程"
|
||||
icon: "iconfont icon-book"
|
||||
url: "/"
|
||||
colorOneLight: "#18e7ae"
|
||||
colorTwoLight: "#1eebeb"
|
||||
colorOneDark: "#099e74"
|
||||
colorTwoDark: "#0ea4a4"
|
||||
children:
|
||||
- $formkit: text
|
||||
name: title
|
||||
label: 标题
|
||||
placeholder: 请输入内容
|
||||
validation: required
|
||||
- $formkit: text
|
||||
name: icon
|
||||
label: 图标
|
||||
placeholder: 请输入内容
|
||||
validation: required
|
||||
- $formkit: url
|
||||
name: bikan
|
||||
label: 必看精选
|
||||
placeholder: 请输入地址
|
||||
value: /
|
||||
- $formkit: url
|
||||
name: remen
|
||||
label: 热门文章
|
||||
placeholder: 请输入地址
|
||||
value: /
|
||||
- $formkit: url
|
||||
name: shiyong
|
||||
label: 实用教程
|
||||
placeholder: 请输入地址
|
||||
value: /
|
||||
name: url
|
||||
label: 跳转地址
|
||||
placeholder: 请输入内容
|
||||
validation: required
|
||||
- $formkit: color
|
||||
name: colorOneLight
|
||||
label: 颜色1 (浅色)
|
||||
validation: required
|
||||
- $formkit: color
|
||||
name: colorTwoLight
|
||||
label: 颜色2 (浅色)
|
||||
validation: required
|
||||
- $formkit: color
|
||||
name: colorOneDark
|
||||
label: 颜色1 (深色)
|
||||
validation: required
|
||||
- $formkit: color
|
||||
name: colorTwoDark
|
||||
label: 颜色2 (深色)
|
||||
validation: required
|
||||
- $formkit: group
|
||||
name: BannerRight
|
||||
label: Banner 右侧
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
<th:block th:each="group : ${photoFinder.groupBy()}">
|
||||
<div class="card" th:onclick="go([[${group.metadata.name}]])">
|
||||
<img class="card_cover entered loaded"
|
||||
th:src="${group.spec.cover}">
|
||||
th:src="${#annotations.get(group, 'cover')}">
|
||||
<div class="card__content">
|
||||
<p class="card__category" th:text="${group.spec.displayName}"></p>
|
||||
<h3 class="card__heading" th:text="${group.spec.description}"></h3>
|
||||
<h3 class="card__heading" th:text="${#annotations.get(group, 'description')}"></h3>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
|
|
@ -172,9 +172,6 @@
|
|||
color: #eee;
|
||||
}
|
||||
|
||||
.default-style a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
:root {
|
||||
--hao-purple: #4976f5;
|
||||
}
|
||||
|
|
|
@ -161,24 +161,54 @@
|
|||
|
||||
<!-- category -->
|
||||
<div class="categoryGroup">
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-blue)">
|
||||
<a class="categoryButton CB1 bikan"
|
||||
th:href="@{${theme.config.top.BannerLeft.bikan}}">
|
||||
<span class="categoryButtonText">必看精选</span><i class="iconfont icon-book"></i>
|
||||
<th:block th:with="groups = ${theme.config.top.BannerLeft.categoryGroup}">
|
||||
<div class="categoryItem">
|
||||
<a class="categoryButton CB1 bikan" th:href="@{${groups[0].url}}">
|
||||
<span class="categoryButtonText">[[${groups[0].title}]]</span><i th:class="${groups[0].icon}"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-red)">
|
||||
<a class="categoryButton remen"
|
||||
th:href="@{${theme.config.top.BannerLeft.remen}}">
|
||||
<span class="categoryButtonText">热门文章</span><i class="iconfont icon-burn"></i>
|
||||
<div class="categoryItem">
|
||||
<a class="categoryButton remen" th:href="@{${groups[1].url}}">
|
||||
<span class="categoryButtonText">[[${groups[1].title}]]</span><i th:class="${groups[1].icon}"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-green)">
|
||||
<a class="categoryButton shiyong"
|
||||
th:href="@{${theme.config.top.BannerLeft.shiyong}}">
|
||||
<span class="categoryButtonText">实用教程</span><i class="iconfont icon-book"></i>
|
||||
<div class="categoryItem">
|
||||
<a class="categoryButton shiyong" th:href="@{${groups[2].url}}">
|
||||
<span class="categoryButtonText">[[${groups[2].title}]]</span><i th:class="${groups[2].icon}"></i>
|
||||
</a>
|
||||
</div>
|
||||
<style>
|
||||
a.categoryButton.bikan {
|
||||
background: linear-gradient(to right, [[${groups[0].colorOneLight}]], [[${groups[0].colorTwoLight}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
|
||||
a.categoryButton.remen {
|
||||
background: linear-gradient(to right, [[${groups[1].colorOneLight}]], [[${groups[1].colorTwoLight}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
|
||||
a.categoryButton.shiyong {
|
||||
background: linear-gradient(to right, [[${groups[2].colorOneLight}]], [[${groups[2].colorTwoLight}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
|
||||
[data-theme=dark] a.categoryButton.bikan {
|
||||
background: linear-gradient(to right, [[${groups[0].colorOneDark}]], [[${groups[0].colorTwoDark}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
|
||||
[data-theme=dark] a.categoryButton.remen {
|
||||
background: linear-gradient(to right, [[${groups[1].colorOneDark}]], [[${groups[1].colorTwoDark}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
|
||||
[data-theme=dark] a.categoryButton.shiyong {
|
||||
background: linear-gradient(to right, [[${groups[2].colorOneDark}]], [[${groups[2].colorTwoDark}]]);
|
||||
background-size: 200%;
|
||||
}
|
||||
</style>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
<script th:inline="javascript">
|
||||
|
|
|
@ -13,11 +13,14 @@
|
|||
<div id="page">
|
||||
<th:block th:each="group : ${photoFinder.groupBy()}">
|
||||
|
||||
<th:block th:if="${#strings.equals(group.metadata.name, param.photo_group_name)}">
|
||||
<th:div th:replace="~{macro/author-content :: author-content(background = ${group.spec.background},
|
||||
|
||||
<th:block th:if="${#strings.equals(group.metadata.name, param.photo_group_name)}"
|
||||
th:with="description = ${#annotations.get(group, 'description')},
|
||||
background = ${#annotations.get(group, 'background')}">
|
||||
<th:div th:replace="~{macro/author-content :: author-content(background = ${background},
|
||||
smallTitle = '相册集',
|
||||
bigTitle = ${group.spec.displayName},
|
||||
detail = ${group.spec.description},
|
||||
detail = ${description},
|
||||
buttonUrl = '',
|
||||
buttonTitle = '')}" />
|
||||
</th:block>
|
||||
|
|
|
@ -47,5 +47,5 @@ spec:
|
|||
repo: https://github.com/liuzhihang/halo-theme-hao
|
||||
settingName: "theme-hao-setting"
|
||||
configMapName: "theme-hao-configMap"
|
||||
version: "1.3.0"
|
||||
require: ">=2.6.0"
|
||||
version: "1.3.1"
|
||||
require: ">=2.8.0"
|
||||
|
|
Loading…
Reference in New Issue