banner-group.html 支持自定义图标
This commit is contained in:
parent
b15e845fca
commit
f7ce8780bd
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
预览:[程序员小航](https://liuzhihang.com)
|
预览:[程序员小航](http://hao.liuzhihang.com/)
|
||||||
|
|
||||||
文档:[语雀](https://www.yuque.com/liuzhihangs/halo-theme-hao)
|
文档:[语雀](https://www.yuque.com/liuzhihangs/halo-theme-hao)
|
||||||
|
|
||||||
|
|
114
settings.yaml
114
settings.yaml
|
@ -36,15 +36,6 @@ spec:
|
||||||
- group: top
|
- group: top
|
||||||
label: 顶部
|
label: 顶部
|
||||||
formSchema:
|
formSchema:
|
||||||
- $formkit: radio
|
|
||||||
name: recentTop
|
|
||||||
label: 首页顶部
|
|
||||||
value: true
|
|
||||||
options:
|
|
||||||
- label: 显示
|
|
||||||
value: true
|
|
||||||
- label: 隐藏
|
|
||||||
value: false
|
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: moment
|
name: moment
|
||||||
label: 说说模块
|
label: 说说模块
|
||||||
|
@ -54,32 +45,98 @@ spec:
|
||||||
value: true
|
value: true
|
||||||
- label: 隐藏
|
- label: 隐藏
|
||||||
value: false
|
value: false
|
||||||
|
- $formkit: radio
|
||||||
|
name: recentTop
|
||||||
|
id: recentTop
|
||||||
|
key: recentTop
|
||||||
|
label: 首页顶部
|
||||||
|
value: true
|
||||||
|
options:
|
||||||
|
- label: 显示
|
||||||
|
value: true
|
||||||
|
- label: 隐藏
|
||||||
|
value: false
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: bannersTitleBig
|
name: bannersTitleBig
|
||||||
label: Banners 大标题
|
label: Banners 大标题
|
||||||
placeholder: 请输入大标题
|
placeholder: 请输入大标题
|
||||||
help: 支持 HTML 语法
|
help: 支持 HTML 语法
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: bannersTitleSmall
|
name: bannersTitleSmall
|
||||||
label: Banners 小标题
|
label: Banners 小标题
|
||||||
placeholder: 请输入小标题
|
placeholder: 请输入小标题
|
||||||
help: 支持 HTML 语法
|
help: 支持 HTML 语法
|
||||||
|
- $formkit: repeater
|
||||||
|
if: "$get(recentTop).value"
|
||||||
|
name: bannersIconPair
|
||||||
|
label: Banner 滚动图标
|
||||||
|
help: 为空时会使用系统内置图标
|
||||||
|
value:
|
||||||
|
- top:
|
||||||
|
bottom:
|
||||||
|
children:
|
||||||
|
- $formkit: group
|
||||||
|
name: top
|
||||||
|
label: 上图标
|
||||||
|
value:
|
||||||
|
url:
|
||||||
|
name:
|
||||||
|
background:
|
||||||
|
children:
|
||||||
- $formkit: url
|
- $formkit: url
|
||||||
|
name: url
|
||||||
|
label: 路径
|
||||||
|
placeholder: 请输入图标路径
|
||||||
|
validation: "url"
|
||||||
|
- $formkit: text
|
||||||
|
name: name
|
||||||
|
label: 名称
|
||||||
|
placeholder: 请输入名称
|
||||||
|
- $formkit: color
|
||||||
|
name: background
|
||||||
|
label: 背景色
|
||||||
|
- $formkit: group
|
||||||
|
name: bottom
|
||||||
|
label: 下图标
|
||||||
|
value:
|
||||||
|
url:
|
||||||
|
name:
|
||||||
|
background:
|
||||||
|
children:
|
||||||
|
- $formkit: url
|
||||||
|
name: url
|
||||||
|
label: 路径
|
||||||
|
placeholder: 请输入图标路径
|
||||||
|
validation: "url"
|
||||||
|
- $formkit: text
|
||||||
|
name: name
|
||||||
|
label: 名称
|
||||||
|
placeholder: 请输入名称
|
||||||
|
- $formkit: color
|
||||||
|
name: background
|
||||||
|
label: 背景色
|
||||||
|
- $formkit: url
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: bikan
|
name: bikan
|
||||||
label: 必看精选
|
label: 必看精选
|
||||||
placeholder: 请输入地址
|
placeholder: 请输入地址
|
||||||
validation: "url"
|
validation: "url"
|
||||||
- $formkit: url
|
- $formkit: url
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: remen
|
name: remen
|
||||||
label: 必看精选
|
label: 必看精选
|
||||||
placeholder: 请输入地址
|
placeholder: 请输入地址
|
||||||
validation: "url"
|
validation: "url"
|
||||||
- $formkit: url
|
- $formkit: url
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: shiyong
|
name: shiyong
|
||||||
label: 必看精选
|
label: 必看精选
|
||||||
placeholder: 请输入地址
|
placeholder: 请输入地址
|
||||||
validation: "url"
|
validation: "url"
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: todayRecommend
|
name: todayRecommend
|
||||||
label: 今日推荐
|
label: 今日推荐
|
||||||
value: false
|
value: false
|
||||||
|
@ -89,16 +146,19 @@ spec:
|
||||||
- label: 隐藏
|
- label: 隐藏
|
||||||
value: false
|
value: false
|
||||||
- $formkit: url
|
- $formkit: url
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: todayRecommendUrl
|
name: todayRecommendUrl
|
||||||
label: 今日推荐跳转地址
|
label: 今日推荐跳转地址
|
||||||
placeholder: 请输入地址
|
placeholder: 请输入地址
|
||||||
validation: "url"
|
validation: "url"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: todayRecommendTitle
|
name: todayRecommendTitle
|
||||||
label: 今日推荐标题
|
label: 今日推荐标题
|
||||||
placeholder: 请输入标题
|
placeholder: 请输入标题
|
||||||
value: "今日推荐"
|
value: "今日推荐"
|
||||||
- $formkit: url
|
- $formkit: url
|
||||||
|
if: "$get(recentTop).value"
|
||||||
name: todayRecommendCover
|
name: todayRecommendCover
|
||||||
label: 今日推荐背景图
|
label: 今日推荐背景图
|
||||||
placeholder: 请输入地址
|
placeholder: 请输入地址
|
||||||
|
@ -155,42 +215,6 @@ spec:
|
||||||
label: "右侧"
|
label: "右侧"
|
||||||
- value: "left-aside"
|
- value: "left-aside"
|
||||||
label: "左侧"
|
label: "左侧"
|
||||||
|
|
||||||
# - $formkit: repeater
|
|
||||||
# name: widgets
|
|
||||||
# label: 小部件
|
|
||||||
# value:
|
|
||||||
# - value: profile
|
|
||||||
# - value: wechat
|
|
||||||
# - value: comments
|
|
||||||
# - value: recent-posts
|
|
||||||
# - value: comments
|
|
||||||
# - value: categories
|
|
||||||
# - value: tags
|
|
||||||
# - value: stat
|
|
||||||
# - value: tags-stat
|
|
||||||
# children:
|
|
||||||
# - $formkit: select
|
|
||||||
# name: value
|
|
||||||
# label: 部件
|
|
||||||
# options:
|
|
||||||
# - label: 站点资料
|
|
||||||
# value: profile
|
|
||||||
# - label: 微信
|
|
||||||
# value: wechat
|
|
||||||
# - label: 近期文章
|
|
||||||
# value: recent-posts
|
|
||||||
# - label: 最新评论
|
|
||||||
# value: comments
|
|
||||||
# - label: 文章分类
|
|
||||||
# value: categories
|
|
||||||
# - label: 文章标签
|
|
||||||
# value: tags
|
|
||||||
# - label: 统计
|
|
||||||
# value: stat
|
|
||||||
# - label: 标签&统计
|
|
||||||
# value: tags-stat
|
|
||||||
|
|
||||||
- $formkit: textarea
|
- $formkit: textarea
|
||||||
name: widgets
|
name: widgets
|
||||||
label: 小部件
|
label: 小部件
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<!-- 改成后台动态可配置-->
|
<!-- 改成后台动态可配置-->
|
||||||
<div class="tags-group-all">
|
<div class="tags-group-all">
|
||||||
<div class="tags-group-wrapper">
|
<div class="tags-group-wrapper" th:if="${#lists.isEmpty(theme.config.top.bannersIconPair)}">
|
||||||
<div class="tags-group-icon-pair">
|
<div class="tags-group-icon-pair">
|
||||||
<div class="tags-group-icon" style="background:#989bf8">
|
<div class="tags-group-icon" style="background:#989bf8">
|
||||||
<img th:src="@{/assets/images/icons/AfterEffect.png}" title="AfterEffect">
|
<img th:src="@{/assets/images/icons/AfterEffect.png}" title="AfterEffect">
|
||||||
|
@ -129,6 +129,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tags-group-wrapper"
|
||||||
|
th:if="${not #lists.isEmpty(theme.config.top.bannersIconPair)}"
|
||||||
|
th:with="iconPairs = ${theme.config.top.bannersIconPair}" >
|
||||||
|
<div class="tags-group-icon-pair" th:each="iconPair : ${iconPairs}">
|
||||||
|
<div class="tags-group-icon" th:style="'background:' + ${iconPair.top.background}">
|
||||||
|
<img th:src="@{${iconPair.top.url}}" th:title="${iconPair.top.name}">
|
||||||
|
</div>
|
||||||
|
<div class="tags-group-icon" th:style="'background:' + ${iconPair.bottom.background}">
|
||||||
|
<img th:src="@{${iconPair.bottom.url}}" th:title="${iconPair.bottom.name}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 随机前往一篇文章 -->
|
<!-- 随机前往一篇文章 -->
|
||||||
<a id="banner-hover" onclick="randomPost()">
|
<a id="banner-hover" onclick="randomPost()">
|
||||||
|
|
Loading…
Reference in New Issue