Merge pull request #10 from liuzhihang/dev

beta.1 版本适配
This commit is contained in:
liuzhihang 2022-11-19 17:38:54 +08:00 committed by GitHub
commit 941a6010aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 954 additions and 115 deletions

View File

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

View File

@ -4,22 +4,40 @@ metadata:
name: theme-hao-setting
spec:
forms:
- group: basics
label: 基础
formSchema:
- $formkit: date
name: siteStartTime
label: 建站时间
- $formkit: text
name: icp
label: ICP 备案
placeholder: 请输入 ICP 备案号
help: "京ICP备xxxxxxxx号"
- $formkit: url
name: copyrightAgreement
label: 版权协议
placeholder: "请输入版权协议地址"
help: '文章模块声明版权,也会使用此协议'
- group: nav
label: 导航
formSchema:
- $formkit: menuRadio
name: left_menu
name: leftMenu
label: 导航栏左侧相关链接
- $formkit: text
name: site_title
name: siteTitle
label: 标题
placeholder: 请输入标题
help: '支持 HTML 语法,比如 <i class="iconfont icon-logo-hao-pro" style="font-size: 1rem"></i>,留空为站点名称'
- group: top
label: 顶部
formSchema:
- $formkit: radio
name: recent_top
name: recentTop
label: 首页顶部
value: true
options:
@ -37,12 +55,12 @@ spec:
- label: 隐藏
value: false
- $formkit: text
name: banners_title_big
name: bannersTitleBig
label: Banners 大标题
placeholder: 请输入大标题
help: 支持 HTML 语法
- $formkit: text
name: banners_title_small
name: bannersTitleSmall
label: Banners 小标题
placeholder: 请输入小标题
help: 支持 HTML 语法
@ -85,6 +103,7 @@ spec:
label: 今日推荐背景图
placeholder: 请输入地址
validation: "url"
- group: layout
label: 布局
formSchema:
@ -103,7 +122,7 @@ spec:
value: col4
help: "建议单列时,将图片放在左右"
- $formkit: select
name: post_location
name: postLocation
label: 封面位置
value: top
options:
@ -116,11 +135,12 @@ spec:
- label: 交替
value: alternate
- $formkit: url
name: post_random_img
name: postRandomImg
label: 博客封面随机 API
validation: "url"
value: "https://source.unsplash.com/random/600x400/?blog,scenery,night,desert,sea"
help: 二次元随机图地址https://www.dmoe.cc/random.php 默认随机封面图 url 不能保证一直可用
- group: sidebar
label: 侧栏
formSchema:
@ -135,72 +155,278 @@ spec:
label: "右侧"
- value: "left-aside"
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
name: widgets
label: 小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat"
help: "目前提供的小部件有profile站点资料, wechat微信, recent-posts近期文章, comments最新评论, categories文章分类, tags文章标签, stat统计, tags-stat标签&统计)。你可以随意组合或排序,以逗号隔开。"
- $formkit: textarea
name: post_widgets
name: postWidgets
label: 文章页面小部件
value: "profile,wechat,toc,comments,recent-posts,categories,tags-stat"
help: "post 可以支持设置 toc "
- $formkit: textarea
name: tag_widgets
name: tagWidgets
label: 标签页面小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat"
- $formkit: textarea
name: category_widgets
name: categoryWidgets
label: 分类页面小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat"
- $formkit: textarea
name: page_widgets
name: pageWidgets
label: 自定义页面小部件
value: ""
- $formkit: text
name: profile_name
label: 个人卡片名称
placeholder: 请填写个人卡片名称
help: "不填写默认为站点则名称"
- $formkit: textarea
name: profile_desc
placeholder: 请填写个人卡片描述信息
help: "支持使用 HTML 标签"
- $formkit: url
name: wechat_img_face
placeholder: 微信正面图
validation: "url"
- $formkit: url
name: wechat_img_back
placeholder: 微信背面图
validation: "url"
help: 图片可以从公众号后台下载物料或者自制
help: "自定义页面默认没有侧栏"
- $formkit: group
name: profile
value:
profileName:
profileDesc:
socialMedia:
children:
- $formkit: text
name: profileName
label: 个人卡片名称
placeholder: 请填写个人卡片名称
help: "不填写默认为站点则名称"
- $formkit: textarea
name: profileDesc
placeholder: 请填写个人卡片描述信息
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
name: wechatImgFace
placeholder: 公众号正面图
validation: "url"
- $formkit: url
name: wechatImgBack
placeholder: 公众号背面图
validation: "url"
help: 图片可以从公众号后台下载物料或者自制
- group: footer
label: 页脚
formSchema:
- $formkit: textarea
name: social
label: 社交链接(无效)
placeholder: 暂时不支持配置
help: "当前版本不支持配置"
- $formkit: repeater
name: socialMedia
label: 社交媒体
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: menuRadio
name: menu
label: 底部相关链接
- $formkit: text
name: copyright_start
label: 开始时间
placeholder: 建站时间
help: "copyright 开始时间"
- $formkit: text
name: icp
label: ICP 备案
placeholder: 请输入 ICP 备案号
help: "京ICP备xxxxxxxx号"
- $formkit: url
name: copyrightAgreement
label: 版权协议
placeholder: "请输入版权协议地址"
help: '文章模块声明版权,也会使用此协议'
- group: post
label: 文章
formSchema:
@ -219,6 +445,34 @@ spec:
label: 版权声明
placeholder: '本文是原创文章,采用 <a target="_blank" href="/cc">CC BY-NC-ND 4.0</a> 协议,完整转载请注明来自 <a href="/" target="_blank" >程序员小航</a>'
help: "版权声明内容,支持填入 HTML 标签"
- group: style
label: 样式WIP
formSchema:
- $formkit: radio
name: colorScheme
label: 默认配色
value: system
options:
- label: 跟随系统
value: system
- label: 深色
value: dark
- label: 浅色
value: light
- $formkit: checkbox
name: enableChangeColorScheme
label: 允许访客切换配色
value: true
- $formkit: textarea
name: fontFamily
label: 全局字体
placeholder: '"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"'
- $formkit: url
name: backgroundImg
label: 全局背景图
placeholder: "请输入图片地址"
- group: snackbar
label: 弹窗
help: 右下角 snackbar 弹窗
@ -255,6 +509,7 @@ spec:
value: "https://github.com/liuzhihang/halo-theme-hao"
label: 介绍框点击跳转地址
placeholder: 请输入跳转 url
- group: rightMenu
label: 右键菜单
formSchema:
@ -267,11 +522,12 @@ spec:
value: true
- label: 关闭
value: false
- group: other
label: 其他设置
formSchema:
- $formkit: radio
name: loading_box
name: loadingBox
label: 加载页
value: true
options:
@ -280,12 +536,12 @@ spec:
- label: 关闭
value: false
- $formkit: url
name: loading_box_img
name: loadingBoxImg
validation: "url"
label: 加载页图片 URL
placeholder: 请输入图片 url
- $formkit: radio
name: load_progress_bar
name: loadProgressBar
label: 页面加载进度条
value: true
help: 了解更多https://codebyzach.github.io/pace/

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3736806 */
src: url('iconfont.woff2?t=1668315437111') format('woff2'),
url('iconfont.woff?t=1668315437111') format('woff'),
url('iconfont.ttf?t=1668315437111') format('truetype');
src: url('iconfont.woff2?t=1668835494725') format('woff2'),
url('iconfont.woff?t=1668835494725') format('woff'),
url('iconfont.ttf?t=1668835494725') format('truetype');
}
.iconfont {
@ -13,6 +13,214 @@
-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 {
content: "\e601";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,370 @@
"css_prefix_text": "icon-",
"description": "",
"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",
"name": "by",

View File

@ -8902,19 +8902,19 @@ li {
-webkit-box-orient: vertical;
}
.recent-post-item .recent-post-info .recent-post-info-top .lastestpost {
display: none;
}
/*.recent-post-item .recent-post-info .recent-post-info-top .pinned-post {*/
/* display: none;*/
/*}*/
@media screen and (min-width: 1300px) {
#recent-posts > .recent-post-item:nth-child(2) .lastestpost {
#recent-posts > .recent-post-item .pinned-post {
display: flex;
color: var(--heo-lighttext);
font-size: 0.5rem;
position: relative;
}
#recent-posts .recent-post-item.lastestpost-item .recent-post-info-top {
#recent-posts .recent-post-item.pinned-post-item .recent-post-info-top {
padding-top: 16px;
}

View File

@ -37,7 +37,7 @@
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${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>
<div class="article-sort-item-info">
<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>
</nav>
</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>
<!-- 底部 -->

View File

@ -4,13 +4,17 @@
<footer id="footer" th:fragment="footer">
<!-- 社交链接,需要填入 href class title -->
<div id="footer_deal" th:if="${not #strings.isEmpty(theme.config.footer.social)}">
<a class="deal_link" href="/" rel="external nofollow" title="mail">
<i class="fa-regular fa-envelope"></i>
<div id="footer_deal"
th:if="${not #lists.isEmpty(theme.config.footer.socialMedia)}"
th:with="socialMedias = ${theme.config.sidebar.profile.socialMedia}">
<a class="deal_link" rel="external nofollow" target="_blank"
th:each="socialMedia : ${socialMedias}"
th:href="${socialMedia.url}"
th:title="${socialMedia.name}">
<i class="iconfont " th:classappend="${socialMedia.icon}"></i>
</a>
</div>
<!-- 相关地址 -->
<th:block th:if="${not #strings.isEmpty(theme.config.footer.menu)}"
th:with="footMenu = ${menuFinder.getByName(theme.config.footer.menu)}">
@ -33,8 +37,11 @@
<div class="footer-banner-links">
<div class="footer-banner-left">
<div id="footer-banner-tips">
<div class="copyright">©[[${theme.config.footer.copyright_start}]] - [[${#dates.format(new
java.util.Date(), 'yyyy')}]] [[${site.title}]].
<div class="copyright" th:if="${not #strings.isEmpty(theme.config.basics.siteStartTime)}">
©[[${#strings.arraySplit(theme.config.basics.siteStartTime, '-')[0]}]] - [[${#dates.format(new java.util.Date(), 'yyyy')}]] [[${site.title}]].
</div>
<div class="copyright" th:if="${#strings.isEmpty(theme.config.basics.siteStartTime)}">
©[[${#dates.format(new java.util.Date(), 'yyyy')}]] [[${site.title}]].
</div>
</div>
<br>
@ -49,11 +56,11 @@
<a class="footer-banner-link" href="https://github.com/liuzhihang/halo-theme-hao">主题</a>
<a class="footer-banner-link" href="/about">关于</a>
<a class="footer-banner-link" href="https://beian.miit.gov.cn/#/Integrated/index"
rel="noopener external nofollow noreferrer noopener" target="_blank">[[${theme.config.footer.icp}]]
rel="noopener external nofollow noreferrer noopener" target="_blank">[[${theme.config.basics.icp}]]
</a>
<a class="footer-banner-link cc"
th:href="${theme.config.footer.copyrightAgreement}"
th:if="${not #strings.isEmpty(theme.config.post.copyrightAgreement)}"
th:href="${theme.config.basics.copyrightAgreement}"
th:if="${not #strings.isEmpty(theme.config.basics.copyrightAgreement)}"
title="cc协议">
<i class="iconfont icon-cc"></i>
<i class="iconfont icon-by"></i>

View File

@ -120,7 +120,7 @@
<!-- 动态加载条 -->
<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"
th:if="${theme.config.other.load_progress_bar}">
th:if="${theme.config.other.loadProgressBar}">
</script>
<!-- 复制 https://github.com/zenorocha/clipboard.js -->

View File

@ -94,7 +94,7 @@
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();
}

View File

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

View File

@ -6,14 +6,17 @@
<!-- card需要添加在没有图片时使用随机图片 -->
<div class="recent-post-item"
th:classappend="${theme.config.layout.cols} + ' ' + ${theme.config.layout.post_location} + ' ' + (${iStat.even} ? 'even' : 'odd')"
th:classappend="${theme.config.layout.cols} + ' ' +
${theme.config.layout.postLocation} + ' ' +
(${iStat.even} ? 'even' : 'odd') +
(${post.spec.pinned} ? 'pinned-post-item' : '')"
th:each="post,iStat : ${postItems}">
<div class="post_cover cover_radius">
<a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}">
<img class="post_bg entered loaded" loading="lazy"
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>
</div>
<!-- 类别非空时 -->
@ -29,7 +32,7 @@
</th:block>
<div class="recent-post-info">
<div class="recent-post-info-top">
<span class="lastestpost">最新文章</span>
<span class="pinned-post" th:if="${post.spec.pinned}">置顶</span>
<a class="article-title"
th:attr="title=${post.spec.title}"
th:href="@{${post.status.permalink}}"

View File

@ -3,7 +3,7 @@
<!-- 置顶的文章-->
<div class="recent-top-post-group" id="recent-top-post-group"
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">
<!-- banner -->

View File

@ -14,8 +14,8 @@
<span>显示模式</span>
</a>
</div>
<th:block th:if="${not #strings.isEmpty(theme.config.nav.left_menu)}"
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.left_menu)}">
<th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu)}"
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
<div class="back-menu-list-groups">
<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="author-info__sayhi" id="author-info__sayhi">你好啊!我是</div>
<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>
<div class="author-info__name"
th:if="${not #strings.isEmpty(theme.config.sidebar.profile_name)}"
th:text="${theme.config.sidebar.profile_name}"></div>
<div class="author-info__description" th:utext="${theme.config.sidebar.profile_desc}">
th:if="${not #strings.isEmpty(theme.config.sidebar.profile.profileName)}"
th:text="${theme.config.sidebar.profile.profileName}"></div>
<div class="author-info__description" th:utext="${theme.config.sidebar.profile.profileDesc}">
</div>
</div>
@ -27,14 +27,15 @@
</a>
</div>
<div class="card-info-social-icons is-center">
<a class="social-icon" href="#" rel="external nofollow" target="_blank"
title="Github">
<i class="iconfont icon-github-line"></i>
</a>
<a class="social-icon" href="#" rel="external nofollow" target="_blank"
title="Mail">
<i class="iconfont icon-mail-line"></i>
<div class="card-info-social-icons is-center"
th:if="${not #lists.isEmpty(theme.config.sidebar.profile.socialMedia)}"
th:with="socialMedias = ${theme.config.sidebar.profile.socialMedia}">
<a class="social-icon" rel="external nofollow" target="_blank"
th:each="socialMedia : ${socialMedias}"
th:href="${socialMedia.url}"
th:title="${socialMedia.name}">
<i class="iconfont " th:classappend="${socialMedia.icon}"></i>
</a>
</div>
</div>

View File

@ -6,7 +6,7 @@
<!-- 最新文章,用户可以自定义展示数量 -->
<div class="aside-list-item" th:each="post : ${posts}">
<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>
<div class="content">
<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>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<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-content">
<div class="face"
th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat1.png' : faceImg }} +') center center / 100% no-repeat;'"></div>
<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>

View File

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

View File

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

View File

@ -9,7 +9,7 @@
<span class="recent-post-top-text"></span>
<img class="post_bg" loading="lazy"
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>
</div>
<div class="recent-post-info">
@ -23,7 +23,7 @@
<!-- 今日推荐 -->
<div class="todayCard" id="todayCard"
th:if="${theme.config.top.todayRecommend}"
th:if="${theme.config.top.todayRecommendSwitch}"
th:onclick="'window.open('+ ${theme.config.top.todayRecommendUrl} +')'">
<div class="todayCard-info">
<div class="todayCard-tips">今日推荐</div>

View File

@ -15,7 +15,7 @@
</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>
<!-- 底部 -->

View File

@ -6,11 +6,11 @@
<div class="post" id="body-wrap">
<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>
<div class="coverdiv" id="coverdiv">
<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 id="post-info">
@ -161,7 +161,7 @@
<div class="post-copyright" th:if="${theme.config.post.copyright}">
<div class="post-copyright__author">
<!-- 版权页 以及版权描述文字 -->
<a class="post-copyright__original" th:href="@{${theme.config.post.copyrightAgreement}}"
<a class="post-copyright__original" th:href="@{${theme.config.basics.copyrightAgreement}}"
title="该文章为原创文章,注意版权协议">原创</a>
<a class="post-copyright-title" href="#"><span th:text="${post.spec.title}"></span></a>
</div>
@ -230,7 +230,7 @@
</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>
<!-- 底部 -->

View File

@ -24,7 +24,7 @@
<div class="article-sort-item" th:each="post : ${postItems}">
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
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>
<div class="article-sort-item-info">
<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>
</nav>
</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>
<!-- 底部 -->

View File

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