调整配置,支持配置 图标

This commit is contained in:
liuzhihang 2022-11-19 13:35:13 +08:00
parent 7d2b222de9
commit d6b6e73adc
25 changed files with 800 additions and 80 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "halo-theme-hao", "name": "halo-theme-hao",
"version": "1.0.0-alpha.5", "version": "1.0.0-beta.1",
"dependencies": { "dependencies": {
} }
} }

View File

@ -20,22 +20,24 @@ spec:
label: 版权协议 label: 版权协议
placeholder: "请输入版权协议地址" placeholder: "请输入版权协议地址"
help: '文章模块声明版权,也会使用此协议' help: '文章模块声明版权,也会使用此协议'
- group: nav - group: nav
label: 导航 label: 导航
formSchema: formSchema:
- $formkit: menuRadio - $formkit: menuRadio
name: left_menu name: leftMenu
label: 导航栏左侧相关链接 label: 导航栏左侧相关链接
- $formkit: text - $formkit: text
name: site_title name: siteTitle
label: 标题 label: 标题
placeholder: 请输入标题 placeholder: 请输入标题
help: '支持 HTML 语法,比如 <i class="iconfont icon-logo-hao-pro" style="font-size: 1rem"></i>,留空为站点名称' help: '支持 HTML 语法,比如 <i class="iconfont icon-logo-hao-pro" style="font-size: 1rem"></i>,留空为站点名称'
- group: top - group: top
label: 顶部 label: 顶部
formSchema: formSchema:
- $formkit: radio - $formkit: radio
name: recent_top name: recentTop
label: 首页顶部 label: 首页顶部
value: true value: true
options: options:
@ -53,12 +55,12 @@ spec:
- label: 隐藏 - label: 隐藏
value: false value: false
- $formkit: text - $formkit: text
name: banners_title_big name: bannersTitleBig
label: Banners 大标题 label: Banners 大标题
placeholder: 请输入大标题 placeholder: 请输入大标题
help: 支持 HTML 语法 help: 支持 HTML 语法
- $formkit: text - $formkit: text
name: banners_title_small name: bannersTitleSmall
label: Banners 小标题 label: Banners 小标题
placeholder: 请输入小标题 placeholder: 请输入小标题
help: 支持 HTML 语法 help: 支持 HTML 语法
@ -120,7 +122,7 @@ spec:
value: col4 value: col4
help: "建议单列时,将图片放在左右" help: "建议单列时,将图片放在左右"
- $formkit: select - $formkit: select
name: post_location name: postLocation
label: 封面位置 label: 封面位置
value: top value: top
options: options:
@ -133,11 +135,12 @@ spec:
- label: 交替 - label: 交替
value: alternate value: alternate
- $formkit: url - $formkit: url
name: post_random_img name: postRandomImg
label: 博客封面随机 API label: 博客封面随机 API
validation: "url" validation: "url"
value: "https://source.unsplash.com/random/600x400/?blog,scenery,night,desert,sea" value: "https://source.unsplash.com/random/600x400/?blog,scenery,night,desert,sea"
help: 二次元随机图地址https://www.dmoe.cc/random.php 默认随机封面图 url 不能保证一直可用 help: 二次元随机图地址https://www.dmoe.cc/random.php 默认随机封面图 url 不能保证一直可用
- group: sidebar - group: sidebar
label: 侧栏 label: 侧栏
formSchema: formSchema:
@ -152,46 +155,185 @@ 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: 小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat" value: "profile,wechat,comments,recent-posts,categories,tags-stat"
help: "目前提供的小部件有profile站点资料, wechat微信, recent-posts近期文章, comments最新评论, categories文章分类, tags文章标签, stat统计, tags-stat标签&统计)。你可以随意组合或排序,以逗号隔开。" help: "目前提供的小部件有profile站点资料, wechat微信, recent-posts近期文章, comments最新评论, categories文章分类, tags文章标签, stat统计, tags-stat标签&统计)。你可以随意组合或排序,以逗号隔开。"
- $formkit: textarea - $formkit: textarea
name: post_widgets name: postWidgets
label: 文章页面小部件 label: 文章页面小部件
value: "profile,wechat,toc,comments,recent-posts,categories,tags-stat" value: "profile,wechat,toc,comments,recent-posts,categories,tags-stat"
help: "post 可以支持设置 toc " help: "post 可以支持设置 toc "
- $formkit: textarea - $formkit: textarea
name: tag_widgets name: tagWidgets
label: 标签页面小部件 label: 标签页面小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat" value: "profile,wechat,comments,recent-posts,categories,tags-stat"
- $formkit: textarea - $formkit: textarea
name: category_widgets name: categoryWidgets
label: 分类页面小部件 label: 分类页面小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat" value: "profile,wechat,comments,recent-posts,categories,tags-stat"
- $formkit: textarea - $formkit: textarea
name: page_widgets name: pageWidgets
label: 自定义页面小部件 label: 自定义页面小部件
value: "" value: ""
help: "自定义页面默认没有侧栏"
- $formkit: group
name: profile
value:
profileName:
profileDesc:
socialMedia:
children:
- $formkit: text - $formkit: text
name: profile_name name: profileName
label: 个人卡片名称 label: 个人卡片名称
placeholder: 请填写个人卡片名称 placeholder: 请填写个人卡片名称
help: "不填写默认为站点则名称" help: "不填写默认为站点则名称"
- $formkit: textarea - $formkit: textarea
name: profile_desc name: profileDesc
placeholder: 请填写个人卡片描述信息 placeholder: 请填写个人卡片描述信息
help: "支持使用 HTML 标签" help: "支持使用 HTML 标签"
- $formkit: repeater
name: socialMedia
label: 社交媒体
help: 侧栏社交媒体建议只设置两个
value:
- icon:
name:
url:
urlType: normal
children:
- $formkit: select
name: icon
label: 图标
options:
- label: 电子邮箱
value: icon-mail-line
- label: 微信
value: icon-wechat2
- label: 公众号
value: icon-weixingongzhonghao
- label: 腾讯 QQ
value: icon-qq-line
- label: 新浪微博
value: icon-weibo-line
- label: 知乎
value: icon-zhihu-line
- label: 豆瓣
value: icon-douban-line
- label: 哔哩哔哩
value: icon-bilibili-line
- label: GitHub
value: icon-github-line
- label: GitLab
value: icon-gitlab-line
- label: 百度
value: icon-baidu-line
- label: 掘金
value: icon-juejin
- label: 语雀
value: icon-yuque
- label: 博客园
value: icon-CN_cnblogs
- label: CSDN
value: icon-csdn1
- label: LeetCode
value: icon-leetcode
- label: 头条
value: icon-jinritoutiao
- label: 抖音 / TikTok
value: icon-douyin
- label: Telegram
value: icon-telegram-line
- label: Facebook
value: icon-facebook-box-line
- label: Instagram
value: icon-instagram-line
- label: LinkedIn
value: icon-linkedin-box-line
- label: Twitter
value: icon-twitter-line
- label: Slack
value: icon-slack-line
- label: Discord
value: icon-discord-line
- label: YouTube
value: icon-youtube-line
- label: Steam
value: icon-steam-fill
- label: Dribbble
value: icon-dribbble-line
- $formkit: text
name: name
label: 名称
- $formkit: text
name: url
label: 链接
validation: "url"
- $formkit: radio
name: urlType
label: 链接类型
value: normal
help: "如果选择了图片类型,那么在访客点击之后会使用弹框的形式加载"
options:
- label: 跳转链接
value: normal
- label: 图片
value: image
- $formkit: group
name: wechat
label: 公众号
value:
wechatImgFace:
wechatImgBack:
children:
- $formkit: url - $formkit: url
name: wechat_img_face name: wechatImgFace
placeholder: 微信正面图 placeholder: 公众号正面图
validation: "url" validation: "url"
- $formkit: url - $formkit: url
name: wechat_img_back name: wechatImgBack
placeholder: 微信背面图 placeholder: 公众号背面图
validation: "url" validation: "url"
help: 图片可以从公众号后台下载物料或者自制 help: 图片可以从公众号后台下载物料或者自制
- group: footer - group: footer
label: 页脚 label: 页脚
formSchema: formSchema:
@ -203,6 +345,7 @@ spec:
- $formkit: menuRadio - $formkit: menuRadio
name: menu name: menu
label: 底部相关链接 label: 底部相关链接
- group: post - group: post
label: 文章 label: 文章
formSchema: formSchema:
@ -221,11 +364,12 @@ spec:
label: 版权声明 label: 版权声明
placeholder: '本文是原创文章,采用 <a target="_blank" href="/cc">CC BY-NC-ND 4.0</a> 协议,完整转载请注明来自 <a href="/" target="_blank" >程序员小航</a>' placeholder: '本文是原创文章,采用 <a target="_blank" href="/cc">CC BY-NC-ND 4.0</a> 协议,完整转载请注明来自 <a href="/" target="_blank" >程序员小航</a>'
help: "版权声明内容,支持填入 HTML 标签" help: "版权声明内容,支持填入 HTML 标签"
- group: style - group: style
label: 样式WIP label: 样式WIP
formSchema: formSchema:
- $formkit: radio - $formkit: radio
name: color_scheme name: colorScheme
label: 默认配色 label: 默认配色
value: system value: system
options: options:
@ -236,7 +380,7 @@ spec:
- label: 浅色 - label: 浅色
value: light value: light
- $formkit: checkbox - $formkit: checkbox
name: enable_change_color_scheme name: enableChangeColorScheme
label: 允许访客切换配色 label: 允许访客切换配色
value: true value: true
- $formkit: textarea - $formkit: textarea
@ -247,6 +391,7 @@ spec:
name: backgroundImg name: backgroundImg
label: 全局背景图 label: 全局背景图
placeholder: "请输入图片地址" placeholder: "请输入图片地址"
- group: snackbar - group: snackbar
label: 弹窗 label: 弹窗
help: 右下角 snackbar 弹窗 help: 右下角 snackbar 弹窗
@ -283,6 +428,7 @@ spec:
value: "https://github.com/liuzhihang/halo-theme-hao" value: "https://github.com/liuzhihang/halo-theme-hao"
label: 介绍框点击跳转地址 label: 介绍框点击跳转地址
placeholder: 请输入跳转 url placeholder: 请输入跳转 url
- group: rightMenu - group: rightMenu
label: 右键菜单 label: 右键菜单
formSchema: formSchema:
@ -295,11 +441,12 @@ spec:
value: true value: true
- label: 关闭 - label: 关闭
value: false value: false
- group: other - group: other
label: 其他设置 label: 其他设置
formSchema: formSchema:
- $formkit: radio - $formkit: radio
name: loading_box name: loadingBox
label: 加载页 label: 加载页
value: true value: true
options: options:
@ -308,12 +455,12 @@ spec:
- label: 关闭 - label: 关闭
value: false value: false
- $formkit: url - $formkit: url
name: loading_box_img name: loadingBoxImg
validation: "url" validation: "url"
label: 加载页图片 URL label: 加载页图片 URL
placeholder: 请输入图片 url placeholder: 请输入图片 url
- $formkit: radio - $formkit: radio
name: load_progress_bar name: loadProgressBar
label: 页面加载进度条 label: 页面加载进度条
value: true value: true
help: 了解更多https://codebyzach.github.io/pace/ help: 了解更多https://codebyzach.github.io/pace/

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3736806 */ font-family: "iconfont"; /* Project id 3736806 */
src: url('iconfont.woff2?t=1668315437111') format('woff2'), src: url('iconfont.woff2?t=1668835494725') format('woff2'),
url('iconfont.woff?t=1668315437111') format('woff'), url('iconfont.woff?t=1668835494725') format('woff'),
url('iconfont.ttf?t=1668315437111') format('truetype'); url('iconfont.ttf?t=1668835494725') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,214 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-csdn1:before {
content: "\e608";
}
.icon-CN_cnblogs:before {
content: "\e64d";
}
.icon-leetcode:before {
content: "\ebf2";
}
.icon-juejin:before {
content: "\e606";
}
.icon-weibiaoti-1:before {
content: "\e607";
}
.icon-csdn:before {
content: "\e60a";
}
.icon-bokeyuan:before {
content: "\e623";
}
.icon-yuque:before {
content: "\e880";
}
.icon-jinritoutiao:before {
content: "\e68d";
}
.icon-weixingongzhonghao:before {
content: "\e605";
}
.icon-steam-line:before {
content: "\e75f";
}
.icon-steam-fill:before {
content: "\e763";
}
.icon-slack-line:before {
content: "\e75c";
}
.icon-linkedin-box-line:before {
content: "\e750";
}
.icon-telegram-line:before {
content: "\e761";
}
.icon-douyin:before {
content: "\e673";
}
.icon-wechat2:before {
content: "\e632";
}
.icon-phone-line:before {
content: "\e6ac";
}
.icon-alipay-line:before {
content: "\e73c";
}
.icon-app-store-line:before {
content: "\e73e";
}
.icon-baidu-line:before {
content: "\e73f";
}
.icon-bilibili-line:before {
content: "\e740";
}
.icon-dingding-line:before {
content: "\e743";
}
.icon-douban-line:before {
content: "\e744";
}
.icon-disqus-line:before {
content: "\e745";
}
.icon-discord-line:before {
content: "\e746";
}
.icon-dribbble-line:before {
content: "\e747";
}
.icon-drive-line:before {
content: "\e748";
}
.icon-facebook-box-line:before {
content: "\e749";
}
.icon-dropbox-line:before {
content: "\e74a";
}
.icon-evernote-line:before {
content: "\e74b";
}
.icon-gitlab-line:before {
content: "\e74d";
}
.icon-google-line:before {
content: "\e74e";
}
.icon-google-play-line:before {
content: "\e74f";
}
.icon-instagram-line:before {
content: "\e751";
}
.icon-line-fill:before {
content: "\e752";
}
.icon-paypal-line:before {
content: "\e757";
}
.icon-qq-line:before {
content: "\e759";
}
.icon-reddit-line:before {
content: "\e75a";
}
.icon-spotify-line:before {
content: "\e75d";
}
.icon-stack-overflow-line:before {
content: "\e75e";
}
.icon-snapchat-line:before {
content: "\e75b";
}
.icon-taobao-line:before {
content: "\e760";
}
.icon-twitter-line:before {
content: "\e762";
}
.icon-wechat-2-line:before {
content: "\e766";
}
.icon-wechat-fill:before {
content: "\e768";
}
.icon-wechat-line:before {
content: "\e769";
}
.icon-weibo-line:before {
content: "\e76a";
}
.icon-whatsapp-line:before {
content: "\e76b";
}
.icon-youtube-line:before {
content: "\e76c";
}
.icon-zhihu-line:before {
content: "\e76d";
}
.icon-wechat-2-fill:before {
content: "\e76e";
}
.icon-by:before { .icon-by:before {
content: "\e601"; content: "\e601";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,370 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "3506983",
"name": "csdn",
"font_class": "csdn1",
"unicode": "e608",
"unicode_decimal": 58888
},
{
"icon_id": "2041684",
"name": "CN_cnblogs",
"font_class": "CN_cnblogs",
"unicode": "e64d",
"unicode_decimal": 58957
},
{
"icon_id": "15378535",
"name": "leetcode",
"font_class": "leetcode",
"unicode": "ebf2",
"unicode_decimal": 60402
},
{
"icon_id": "18422914",
"name": "juejin",
"font_class": "juejin",
"unicode": "e606",
"unicode_decimal": 58886
},
{
"icon_id": "18458782",
"name": "infoQ",
"font_class": "weibiaoti-1",
"unicode": "e607",
"unicode_decimal": 58887
},
{
"icon_id": "829865",
"name": "csdn",
"font_class": "csdn",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "833511",
"name": "博客园",
"font_class": "bokeyuan",
"unicode": "e623",
"unicode_decimal": 58915
},
{
"icon_id": "4936975",
"name": "yuque",
"font_class": "yuque",
"unicode": "e880",
"unicode_decimal": 59520
},
{
"icon_id": "13743995",
"name": "jinritoutiao",
"font_class": "jinritoutiao",
"unicode": "e68d",
"unicode_decimal": 59021
},
{
"icon_id": "28650243",
"name": "微信公众号",
"font_class": "weixingongzhonghao",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "20818171",
"name": "steam-line",
"font_class": "steam-line",
"unicode": "e75f",
"unicode_decimal": 59231
},
{
"icon_id": "20818172",
"name": "steam-fill",
"font_class": "steam-fill",
"unicode": "e763",
"unicode_decimal": 59235
},
{
"icon_id": "20818156",
"name": "slack-line",
"font_class": "slack-line",
"unicode": "e75c",
"unicode_decimal": 59228
},
{
"icon_id": "20818112",
"name": "linkedin-box-line",
"font_class": "linkedin-box-line",
"unicode": "e750",
"unicode_decimal": 59216
},
{
"icon_id": "20818178",
"name": "telegram-line",
"font_class": "telegram-line",
"unicode": "e761",
"unicode_decimal": 59233
},
{
"icon_id": "22273028",
"name": "douyin",
"font_class": "douyin",
"unicode": "e673",
"unicode_decimal": 58995
},
{
"icon_id": "14629289",
"name": "wechat2",
"font_class": "wechat2",
"unicode": "e632",
"unicode_decimal": 58930
},
{
"icon_id": "20817466",
"name": "phone-line",
"font_class": "phone-line",
"unicode": "e6ac",
"unicode_decimal": 59052
},
{
"icon_id": "20818029",
"name": "alipay-line",
"font_class": "alipay-line",
"unicode": "e73c",
"unicode_decimal": 59196
},
{
"icon_id": "20818039",
"name": "app-store-line",
"font_class": "app-store-line",
"unicode": "e73e",
"unicode_decimal": 59198
},
{
"icon_id": "20818044",
"name": "baidu-line",
"font_class": "baidu-line",
"unicode": "e73f",
"unicode_decimal": 59199
},
{
"icon_id": "20818045",
"name": "bilibili-line",
"font_class": "bilibili-line",
"unicode": "e740",
"unicode_decimal": 59200
},
{
"icon_id": "20818057",
"name": "dingding-line",
"font_class": "dingding-line",
"unicode": "e743",
"unicode_decimal": 59203
},
{
"icon_id": "20818060",
"name": "douban-line",
"font_class": "douban-line",
"unicode": "e744",
"unicode_decimal": 59204
},
{
"icon_id": "20818061",
"name": "disqus-line",
"font_class": "disqus-line",
"unicode": "e745",
"unicode_decimal": 59205
},
{
"icon_id": "20818062",
"name": "discord-line",
"font_class": "discord-line",
"unicode": "e746",
"unicode_decimal": 59206
},
{
"icon_id": "20818064",
"name": "dribbble-line",
"font_class": "dribbble-line",
"unicode": "e747",
"unicode_decimal": 59207
},
{
"icon_id": "20818065",
"name": "drive-line",
"font_class": "drive-line",
"unicode": "e748",
"unicode_decimal": 59208
},
{
"icon_id": "20818068",
"name": "facebook-box-line",
"font_class": "facebook-box-line",
"unicode": "e749",
"unicode_decimal": 59209
},
{
"icon_id": "20818074",
"name": "dropbox-line",
"font_class": "dropbox-line",
"unicode": "e74a",
"unicode_decimal": 59210
},
{
"icon_id": "20818085",
"name": "evernote-line",
"font_class": "evernote-line",
"unicode": "e74b",
"unicode_decimal": 59211
},
{
"icon_id": "20818088",
"name": "gitlab-line",
"font_class": "gitlab-line",
"unicode": "e74d",
"unicode_decimal": 59213
},
{
"icon_id": "20818092",
"name": "google-line",
"font_class": "google-line",
"unicode": "e74e",
"unicode_decimal": 59214
},
{
"icon_id": "20818094",
"name": "google-play-line",
"font_class": "google-play-line",
"unicode": "e74f",
"unicode_decimal": 59215
},
{
"icon_id": "20818106",
"name": "instagram-line",
"font_class": "instagram-line",
"unicode": "e751",
"unicode_decimal": 59217
},
{
"icon_id": "20818121",
"name": "line-fill",
"font_class": "line-fill",
"unicode": "e752",
"unicode_decimal": 59218
},
{
"icon_id": "20818138",
"name": "paypal-line",
"font_class": "paypal-line",
"unicode": "e757",
"unicode_decimal": 59223
},
{
"icon_id": "20818146",
"name": "qq-line",
"font_class": "qq-line",
"unicode": "e759",
"unicode_decimal": 59225
},
{
"icon_id": "20818153",
"name": "reddit-line",
"font_class": "reddit-line",
"unicode": "e75a",
"unicode_decimal": 59226
},
{
"icon_id": "20818162",
"name": "spotify-line",
"font_class": "spotify-line",
"unicode": "e75d",
"unicode_decimal": 59229
},
{
"icon_id": "20818166",
"name": "stack-overflow-line",
"font_class": "stack-overflow-line",
"unicode": "e75e",
"unicode_decimal": 59230
},
{
"icon_id": "20818168",
"name": "snapchat-line",
"font_class": "snapchat-line",
"unicode": "e75b",
"unicode_decimal": 59227
},
{
"icon_id": "20818175",
"name": "taobao-line",
"font_class": "taobao-line",
"unicode": "e760",
"unicode_decimal": 59232
},
{
"icon_id": "20818181",
"name": "twitter-line",
"font_class": "twitter-line",
"unicode": "e762",
"unicode_decimal": 59234
},
{
"icon_id": "20818193",
"name": "wechat-2-line",
"font_class": "wechat-2-line",
"unicode": "e766",
"unicode_decimal": 59238
},
{
"icon_id": "20818195",
"name": "wechat-fill",
"font_class": "wechat-fill",
"unicode": "e768",
"unicode_decimal": 59240
},
{
"icon_id": "20818198",
"name": "wechat-line",
"font_class": "wechat-line",
"unicode": "e769",
"unicode_decimal": 59241
},
{
"icon_id": "20818200",
"name": "weibo-line",
"font_class": "weibo-line",
"unicode": "e76a",
"unicode_decimal": 59242
},
{
"icon_id": "20818206",
"name": "whatsapp-line",
"font_class": "whatsapp-line",
"unicode": "e76b",
"unicode_decimal": 59243
},
{
"icon_id": "20818213",
"name": "youtube-line",
"font_class": "youtube-line",
"unicode": "e76c",
"unicode_decimal": 59244
},
{
"icon_id": "20818220",
"name": "zhihu-line",
"font_class": "zhihu-line",
"unicode": "e76d",
"unicode_decimal": 59245
},
{
"icon_id": "20818226",
"name": "wechat-2-fill",
"font_class": "wechat-2-fill",
"unicode": "e76e",
"unicode_decimal": 59246
},
{ {
"icon_id": "12095053", "icon_id": "12095053",
"name": "by", "name": "by",

View File

@ -37,7 +37,7 @@
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}" <a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}"> th:title="${post.spec.title}">
<img th:alt="${post.spec.title}" <img th:alt="${post.spec.title}"
th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a> </a>
<div class="article-sort-item-info"> <div class="article-sort-item-info">
<div class="article-sort-item-time"><i class="far fa-calendar-alt"></i> <div class="article-sort-item-time"><i class="far fa-calendar-alt"></i>
@ -66,7 +66,7 @@
<div class="pagination"><span class="page-number current">1</span></div> <div class="pagination"><span class="page-number current">1</span></div>
</nav> </nav>
</div> </div>
<div th:replace="modules/aside :: aside(${theme.config.sidebar.category_widgets})"></div> <div th:replace="modules/aside :: aside(${theme.config.sidebar.categoryWidgets})"></div>
</main> </main>
<!-- 底部 --> <!-- 底部 -->

View File

@ -120,7 +120,7 @@
<!-- 动态加载条 --> <!-- 动态加载条 -->
<script data-pace-options='{ "restartOnRequestAfter":false,"eventLag":false}' <script data-pace-options='{ "restartOnRequestAfter":false,"eventLag":false}'
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/pace/1.2.4/pace.min.js" src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/pace/1.2.4/pace.min.js"
th:if="${theme.config.other.load_progress_bar}"> th:if="${theme.config.other.loadProgressBar}">
</script> </script>
<!-- 复制 https://github.com/zenorocha/clipboard.js --> <!-- 复制 https://github.com/zenorocha/clipboard.js -->

View File

@ -94,7 +94,7 @@
coverColor(); coverColor();
if ([[${theme.config.other.loading_box} and not ${#strings.isEmpty(theme.config.other.loading_box_img)}]]) { if ([[${theme.config.other.loadingBox} and not ${#strings.isEmpty(theme.config.other.loadingBoxImg)}]]) {
// 移除加载动画 // 移除加载动画
removeLoading(); removeLoading();
} }

View File

@ -4,9 +4,9 @@
<!-- loading 页面todo 这块都可以不要,后面删除,先精简代码,后续考虑组件添加 --> <!-- loading 页面todo 这块都可以不要,后面删除,先精简代码,后续考虑组件添加 -->
<div id="loading-box" onclick="heo.hideLoading()" <div id="loading-box" onclick="heo.hideLoading()"
th:fragment="loading-box" th:fragment="loading-box"
th:if="${theme.config.other.loading_box} and not ${#strings.isEmpty(theme.config.other.loading_box_img)}"> th:if="${theme.config.other.loadingBox} and not ${#strings.isEmpty(theme.config.other.loadingBoxImg)}">
<div class="loading-bg"> <div class="loading-bg">
<img class="loading-img" th:src="${theme.config.other.loading_box_img}"> <img class="loading-img" th:src="${theme.config.other.loadingBoxImg}">
</div> </div>
<script> <script>

View File

@ -7,7 +7,7 @@
<!-- card需要添加在没有图片时使用随机图片 --> <!-- card需要添加在没有图片时使用随机图片 -->
<div class="recent-post-item" <div class="recent-post-item"
th:classappend="${theme.config.layout.cols} + ' ' + th:classappend="${theme.config.layout.cols} + ' ' +
${theme.config.layout.post_location} + ' ' + ${theme.config.layout.postLocation} + ' ' +
(${iStat.even} ? 'even' : 'odd') + (${iStat.even} ? 'even' : 'odd') +
(${post.spec.pinned} ? 'pinned-post-item' : '')" (${post.spec.pinned} ? 'pinned-post-item' : '')"
th:each="post,iStat : ${postItems}"> th:each="post,iStat : ${postItems}">
@ -16,7 +16,7 @@
<a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}"> <a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}">
<img class="post_bg entered loaded" loading="lazy" <img class="post_bg entered loaded" loading="lazy"
th:alt="${post.status.excerpt}" th:alt="${post.status.excerpt}"
th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a> </a>
</div> </div>
<!-- 类别非空时 --> <!-- 类别非空时 -->

View File

@ -3,7 +3,7 @@
<!-- 置顶的文章--> <!-- 置顶的文章-->
<div class="recent-top-post-group" id="recent-top-post-group" <div class="recent-top-post-group" id="recent-top-post-group"
th:fragment="recent-top" th:fragment="recent-top"
th:if="${theme.config.top.recent_top}"> th:if="${theme.config.top.recentTop}">
<div class="recent-post-top" id="recent-post-top"> <div class="recent-post-top" id="recent-post-top">
<!-- banner --> <!-- banner -->

View File

@ -14,8 +14,8 @@
<span>显示模式</span> <span>显示模式</span>
</a> </a>
</div> </div>
<th:block th:if="${not #strings.isEmpty(theme.config.nav.left_menu)}" <th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu)}"
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.left_menu)}"> th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
<div class="back-menu-list-groups"> <div class="back-menu-list-groups">
<div class="back-menu-list-group" th:each="menuItem : ${leftMenu.menuItems}"> <div class="back-menu-list-group" th:each="menuItem : ${leftMenu.menuItems}">

View File

@ -8,12 +8,12 @@
<div class="card-info-avatar is-center"> <div class="card-info-avatar is-center">
<div class="author-info__sayhi" id="author-info__sayhi">你好啊!我是</div> <div class="author-info__sayhi" id="author-info__sayhi">你好啊!我是</div>
<div class="author-info__name" <div class="author-info__name"
th:if="${#strings.isEmpty(theme.config.sidebar.profile_name)}" th:if="${#strings.isEmpty(theme.config.sidebar.profile.profileName)}"
th:text="${site.title}"></div> th:text="${site.title}"></div>
<div class="author-info__name" <div class="author-info__name"
th:if="${not #strings.isEmpty(theme.config.sidebar.profile_name)}" th:if="${not #strings.isEmpty(theme.config.sidebar.profile.profileName)}"
th:text="${theme.config.sidebar.profile_name}"></div> th:text="${theme.config.sidebar.profile.profileName}"></div>
<div class="author-info__description" th:utext="${theme.config.sidebar.profile_desc}"> <div class="author-info__description" th:utext="${theme.config.sidebar.profile.profileDesc}">
</div> </div>
</div> </div>
@ -27,14 +27,15 @@
</a> </a>
</div> </div>
<div class="card-info-social-icons is-center"> <div class="card-info-social-icons is-center"
<a class="social-icon" href="#" rel="external nofollow" target="_blank" th:if="${not #lists.isEmpty(theme.config.sidebar.profile.socialMedia)}"
title="Github"> th:with="socialMedias = ${theme.config.sidebar.profile.socialMedia}">
<i class="iconfont icon-github-line"></i>
</a> <a class="social-icon" rel="external nofollow" target="_blank"
<a class="social-icon" href="#" rel="external nofollow" target="_blank" th:each="socialMedia : ${socialMedias}"
title="Mail"> th:href="${socialMedia.url}"
<i class="iconfont icon-mail-line"></i> th:title="${socialMedia.name}">
<i class="iconfont " th:classappend="${socialMedia.icon}"></i>
</a> </a>
</div> </div>
</div> </div>

View File

@ -6,7 +6,7 @@
<!-- 最新文章,用户可以自定义展示数量 --> <!-- 最新文章,用户可以自定义展示数量 -->
<div class="aside-list-item" th:each="post : ${posts}"> <div class="aside-list-item" th:each="post : ${posts}">
<a class="thumbnail" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}"> <a class="thumbnail" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
<img loading="lazy" th:alt="${post.spec.title}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> <img loading="lazy" th:alt="${post.spec.title}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a> </a>
<div class="content"> <div class="content">
<a class="title" th:href="@{${post.status.permalink}}" th:text="${post.spec.title}" th:title="${post.spec.title}"></a> <a class="title" th:href="@{${post.status.permalink}}" th:text="${post.spec.title}" th:title="${post.spec.title}"></a>

View File

@ -1,13 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"> <html lang="en" xmlns:th="http://www.thymeleaf.org">
<div class="card-widget heo-right-widget" id="card-wechat" th:fragment="wechat" <div class="card-widget heo-right-widget" id="card-wechat" th:fragment="wechat"
th:with="faceImg = ${theme.config.sidebar.wechat_img_back}, backImg=${theme.config.sidebar.wechat_img_back}"> th:with="faceImg = ${theme.config.sidebar.wechat.wechatImgFace}, backImg=${theme.config.sidebar.wechat.wechatImgBack}">
<div id="flip-wrapper"> <div id="flip-wrapper">
<div id="flip-content"> <div id="flip-content">
<div class="face" <div class="face"
th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat1.png' : faceImg }} +') center center / 100% no-repeat;'"></div> th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat1.png' : faceImg }} +') center center / 100% no-repeat;'"></div>
<div class="back face" <div class="back face"
th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat2.png' : faceImg }} +') center center / 100% no-repeat;'"></div> th:style="'background: url('+ @{${#strings.isEmpty(backImg) ? '/assets/images/wechat/wechat2.png' : backImg }} +') center center / 100% no-repeat;'"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -6,11 +6,11 @@
<div id="banners"> <div id="banners">
<div class="banners-title"> <div class="banners-title">
<div class="banners-title-big" <div class="banners-title-big"
th:if="${not #strings.isEmpty(theme.config.top.banners_title_big)}" th:if="${not #strings.isEmpty(theme.config.top.bannersTitleBig)}"
th:utext="${theme.config.top.banners_title_big}"></div> th:utext="${theme.config.top.bannersTitleBig}"></div>
<div class="banners-title-small" <div class="banners-title-small"
th:if="${not #strings.isEmpty(theme.config.top.banners_title_small)}" th:if="${not #strings.isEmpty(theme.config.top.bannersTitleSmall)}"
th:utext="${theme.config.top.banners_title_small}"></div> th:utext="${theme.config.top.bannersTitleSmall}"></div>
</div> </div>
<!-- 改成后台动态可配置--> <!-- 改成后台动态可配置-->

View File

@ -4,8 +4,8 @@
<!-- 导航栏左侧 --> <!-- 导航栏左侧 -->
<div id="blog_name" th:fragment="nav-left"> <div id="blog_name" th:fragment="nav-left">
<th:block th:if="${not #strings.isEmpty(theme.config.nav.left_menu)}" <th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu)}"
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.left_menu)}"> th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
<!-- 菜单栏左侧按钮,没有配置时,则不展示--> <!-- 菜单栏左侧按钮,没有配置时,则不展示-->
<div class="back-home-button" tabindex="-1" <div class="back-home-button" tabindex="-1"
th:if="${not #lists.isEmpty(leftMenu)}"> th:if="${not #lists.isEmpty(leftMenu)}">
@ -35,7 +35,7 @@
<!-- 返回主页 --> <!-- 返回主页 -->
<!-- 这里可以指定使用什么作为图标,默认使用站点名称 --> <!-- 这里可以指定使用什么作为图标,默认使用站点名称 -->
<a href="/" id="site-name" title="返回博客主页"> <a href="/" id="site-name" title="返回博客主页">
<span th:utext="${#strings.isEmpty(theme.config.nav.site_title)} ? ${site.title} : ${theme.config.nav.site_title}"></span> <span th:utext="${#strings.isEmpty(theme.config.nav.siteTitle)} ? ${site.title} : ${theme.config.nav.siteTitle}"></span>
</a> </a>
</div> </div>

View File

@ -9,7 +9,7 @@
<span class="recent-post-top-text"></span> <span class="recent-post-top-text"></span>
<img class="post_bg" loading="lazy" <img class="post_bg" loading="lazy"
th:alt="${post.spec.title}" th:alt="${post.spec.title}"
th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a> </a>
</div> </div>
<div class="recent-post-info"> <div class="recent-post-info">

View File

@ -15,7 +15,7 @@
</div> </div>
<!-- 侧栏 --> <!-- 侧栏 -->
<div th:replace="modules/aside :: aside(${theme.config.sidebar.page_widgets})"></div> <div th:replace="modules/aside :: aside(${theme.config.sidebar.pageWidgets})"></div>
</main> </main>
<!-- 底部 --> <!-- 底部 -->

View File

@ -6,11 +6,11 @@
<div class="post" id="body-wrap"> <div class="post" id="body-wrap">
<header class="post-bg" id="page-header" <header class="post-bg" id="page-header"
th:style="'background-image:url(' + (${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}) + ')'"> th:style="'background-image:url(' + (${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}) + ')'">
<nav th:replace="modules/nav :: nav"></nav> <nav th:replace="modules/nav :: nav"></nav>
<div class="coverdiv" id="coverdiv"> <div class="coverdiv" id="coverdiv">
<img crossorigin="anonymous" id="post-cover" <img crossorigin="anonymous" id="post-cover"
th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</div> </div>
<div id="post-info"> <div id="post-info">
@ -230,7 +230,7 @@
</div> </div>
<!-- 侧栏 --> <!-- 侧栏 -->
<div th:replace="modules/aside :: aside(${theme.config.sidebar.post_widgets})"></div> <div th:replace="modules/aside :: aside(${theme.config.sidebar.postWidgets})"></div>
</main> </main>
<!-- 底部 --> <!-- 底部 -->

View File

@ -24,7 +24,7 @@
<div class="article-sort-item" th:each="post : ${postItems}"> <div class="article-sort-item" th:each="post : ${postItems}">
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}" <a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}"> th:title="${post.spec.title}">
<img loading="lazy" th:alt="${post.status.excerpt}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.post_random_img : post.spec.cover}"> <img loading="lazy" th:alt="${post.status.excerpt}" th:src="${#strings.isEmpty(post.spec.cover) ? theme.config.layout.postRandomImg : post.spec.cover}">
</a> </a>
<div class="article-sort-item-info"> <div class="article-sort-item-info">
<div class="article-sort-item-time"><i class="far fa-calendar-alt"></i> <div class="article-sort-item-time"><i class="far fa-calendar-alt"></i>
@ -50,7 +50,7 @@
<div class="pagination"><span class="page-number current">1</span></div> <div class="pagination"><span class="page-number current">1</span></div>
</nav> </nav>
</div> </div>
<div th:replace="modules/aside :: aside(${theme.config.sidebar.tag_widgets})"></div> <div th:replace="modules/aside :: aside(${theme.config.sidebar.tagWidgets})"></div>
</main> </main>
<!-- 底部 --> <!-- 底部 -->

View File

@ -13,5 +13,5 @@ spec:
repo: 'https://github.com/liuzhihang/halo-theme-hao' repo: 'https://github.com/liuzhihang/halo-theme-hao'
settingName: "theme-hao-setting" settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap" configMapName: "theme-hao-configMap"
version: alpha.5 version: beta.1
require: 2.0.0 require: 2.0.0