Merge remote-tracking branch 'origin/main'

# Conflicts:
#	templates/assets/zhheo/zhheoblog.css
This commit is contained in:
1152958806@qq.com 2023-07-01 01:55:57 +08:00
commit df1ea9437f
10 changed files with 563 additions and 535 deletions

View File

@ -1,6 +1,16 @@
{
"skipCi": true,
"contributors": [
{
"login": "liuzhihang",
"name": "liuzhihang",
"avatar_url": "https://avatars.githubusercontent.com/u/26057042?v=4",
"profile": "https://liuzhihang.com/",
"contributions": [
"code",
"tutorial"
]
},
{
"login": "shy-share",
"name": "sunheyi",
@ -62,7 +72,7 @@
"name": "Gadore",
"avatar_url": "https://avatars.githubusercontent.com/u/18081104?v=4",
"profile": "https://github.com/gadore",
"contributions": [
"contributions": [
"code"
]
},
@ -74,6 +84,15 @@
"contributions": [
"code"
]
},
{
"login": "chengzhongxue",
"name": "困困鱼",
"avatar_url": "https://avatars.githubusercontent.com/u/89380218?v=4",
"profile": "https://github.com/chengzhongxue",
"contributions": [
"code"
]
}
],
"files": [
@ -87,5 +106,6 @@
"commit": false,
"imageSize": 100,
"linkToUsage": true,
"contributorsPerLine": 6
"contributorsPerLine": 6,
"commitType": "docs"
}

105
README.md
View File

@ -6,7 +6,7 @@
[主题预览](#预览) |
[快速上手](#安装) |
[使用文档](https://docs.liuzhihang.com) |
[加入我们](#加入我们)
[加入我们](#讨论)
</p>
</div>
@ -27,30 +27,49 @@
- 程序员小航:[https://liuzhihang.com](https://liuzhihang.com)
- 小孙同学:[https://blog.sunguoqi.com](https://blog.sunguoqi.com)
- 困困鱼:[https://0206.ink](https://0206.ink)
- Steven的博客: [https://blog.stevenw.cc/](https://blog.stevenw.cc/)
- 小张博客: [https://www.xiaozhangstu.com/](https://www.xiaozhangstu.com/)
- 流殃:[https://shyblog.world/](https://shyblog.world/)
## 简介
&emsp;&emsp;[Halo-Theme-Hao](https://github.com/liuzhihang/halo-theme-hao) 是一款适用于 [Halo2.x](https://github.com/halo-dev/halo) 的博客主题。
&emsp;&emsp;移植自 [Hexo](https://hexo.io/zh-cn/index.html) 社区中 [张洪 Heo](https://blog.zhheo.com/)
[Halo-Theme-Hao](https://github.com/liuzhihang/halo-theme-hao) 是一款适用于 [Halo2.x](https://github.com/halo-dev/halo) 的博客主题。移植自 [Hexo](https://hexo.io/zh-cn/index.html) 社区中 [张洪 Heo](https://blog.zhheo.com/)
对 [Hexo-Theme-Butterfly](https://github.com/liuzhihang/halo-theme-hao)
主题的魔改版本。
## 安装
&emsp;&emsp;在 [Release](https://github.com/liuzhihang/halo-theme-hao/releases) 页面下载最新版本 `zip` 后,通过 `Halo Console` 安装上传即可。
&emsp;&emsp;详细文档请参考:[https://docs.halo.run/user-guide/themes](https://docs.halo.run/user-guide/themes)
在 [Release](https://github.com/liuzhihang/halo-theme-hao/releases) 页面下载最新版本 `zip` 后,通过 `Halo Console` 安装上传即可。
## 使用
### &emsp;&emsp;[点我查看正在编写中的文档](https://docs.liuzhihang.com)
### [点我查看正在编写中的文档](https://docs.liuzhihang.com)
## 许可
[Halo-Theme-Hao](https://github.com/liuzhihang/halo-theme-hao) 使用 [GPL-v3.0](./LICENSE) 协议开源,请遵守开源协议。
## 讨论
如果你对主题有什么建议或者意见,欢迎提 PR & issue。
想了解更多信息可以关注 「 程序员小航 」。
<img width="500" src="https://liuzhihang.com/themes/theme-hao/assets/images/wechat/wechat1.png" />
- 发送 "hao 群" 可以加群 (群验证信息最好是个人网站)
- 发送"加好友",可以加我微信,我拉你进群 (群二维码失效时)
> 卖服务器的广告人,就不要加了。
## 贡献
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)) :)
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
@ -59,16 +78,29 @@
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://shyblog.world/"><img src="https://avatars.githubusercontent.com/u/50973219?v=4?s=100" width="100px;" alt="sunheyi"/><br /><sub><b>sunheyi</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=shy-share" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Joydevelop"><img src="https://avatars.githubusercontent.com/u/79132319?v=4?s=100" width="100px;" alt="Joy"/><br /><sub><b>Joy</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=Joydevelop" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://johnniang.me"><img src="https://avatars.githubusercontent.com/u/16865714?v=4?s=100" width="100px;" alt="John Niang"/><br /><sub><b>John Niang</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=JohnNiang" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://lanbinovo.cn"><img src="https://avatars.githubusercontent.com/u/62149873?v=4?s=100" width="100px;" alt="Lanbin"/><br /><sub><b>Lanbin</b></sub></a><br /><a href="#tutorial-lanbinshijie" title="Tutorials"></a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sunguoqi.com/"><img src="https://avatars.githubusercontent.com/u/79169717?v=4?s=100" width="100px;" alt="小孙同学"/><br /><sub><b>小孙同学</b></sub></a><br /><a href="#tutorial-sun0225SUN" title="Tutorials"></a> <a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=sun0225SUN" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://airbozh.cn"><img src="https://avatars.githubusercontent.com/u/50261327?v=4?s=100" width="100px;" alt="airbo"/><br /><sub><b>airbo</b></sub></a><br /><a href="#tutorial-AirboZH" title="Tutorials"></a> <a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=AirboZH" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gadore"><img src="https://avatars.githubusercontent.com/u/18081104?v=4?s=100" width="100px;" alt="Gadore"/><br /><sub><b>Gadore</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=gadore" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.hydsb0.com"><img src="https://avatars.githubusercontent.com/u/64968400?v=4?s=100" width="100px;" alt="羡羡"/><br /><sub><b>羡羡</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=xyhcode" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://liuzhihang.com/"><img src="https://avatars.githubusercontent.com/u/26057042?v=4?s=100" width="100px;" alt="liuzhihang"/><br /><sub><b>liuzhihang</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=liuzhihang" title="Code">💻</a> <a href="#tutorial-liuzhihang" title="Tutorials"></a></td>
<td align="center" valign="top" width="16.66%"><a href="https://shyblog.world/"><img src="https://avatars.githubusercontent.com/u/50973219?v=4?s=100" width="100px;" alt="sunheyi"/><br /><sub><b>sunheyi</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=shy-share" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/Joydevelop"><img src="https://avatars.githubusercontent.com/u/79132319?v=4?s=100" width="100px;" alt="Joy"/><br /><sub><b>Joy</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=Joydevelop" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://johnniang.me"><img src="https://avatars.githubusercontent.com/u/16865714?v=4?s=100" width="100px;" alt="John Niang"/><br /><sub><b>John Niang</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=JohnNiang" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://lanbinovo.cn"><img src="https://avatars.githubusercontent.com/u/62149873?v=4?s=100" width="100px;" alt="Lanbin"/><br /><sub><b>Lanbin</b></sub></a><br /><a href="#tutorial-lanbinshijie" title="Tutorials"></a></td>
<td align="center" valign="top" width="16.66%"><a href="https://sunguoqi.com/"><img src="https://avatars.githubusercontent.com/u/79169717?v=4?s=100" width="100px;" alt="小孙同学"/><br /><sub><b>小孙同学</b></sub></a><br /><a href="#tutorial-sun0225SUN" title="Tutorials"></a> <a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=sun0225SUN" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="16.66%"><a href="http://airbozh.cn"><img src="https://avatars.githubusercontent.com/u/50261327?v=4?s=100" width="100px;" alt="airbo"/><br /><sub><b>airbo</b></sub></a><br /><a href="#tutorial-AirboZH" title="Tutorials"></a> <a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=AirboZH" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/gadore"><img src="https://avatars.githubusercontent.com/u/18081104?v=4?s=100" width="100px;" alt="Gadore"/><br /><sub><b>Gadore</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=gadore" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://www.hydsb0.com"><img src="https://avatars.githubusercontent.com/u/64968400?v=4?s=100" width="100px;" alt="羡羡"/><br /><sub><b>羡羡</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=xyhcode" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/chengzhongxue"><img src="https://avatars.githubusercontent.com/u/89380218?v=4?s=100" width="100px;" alt="困困鱼"/><br /><sub><b>困困鱼</b></sub></a><br /><a href="https://github.com/liuzhihang/halo-theme-hao/commits?author=chengzhongxue" title="Code">💻</a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="center" size="13px" colspan="6">
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
</img>
</td>
</tr>
</tfoot>
</table>
<!-- markdownlint-restore -->
@ -76,38 +108,11 @@
<!-- ALL-CONTRIBUTORS-LIST:END -->
## 许可
## 指标
&emsp;&emsp;[Halo-Theme-Hao](https://github.com/liuzhihang/halo-theme-hao) 使用 [GPL-v3.0](./LICENSE) 协议开源,请遵守开源协议。
![Alt](https://repobeats.axiom.co/api/embed/7cb154a9a3fe9cda4fe1a982bdd20adb760edf20.svg "Repobeats analytics image")
## 加入我们
> 本项目使用 JetBrains IDEA 进行开发
&emsp;&emsp;如果你对主题有什么建议或者意见,欢迎提 PR & issue。
&emsp;&emsp;想了解更多信息可以关注 「 程序员小航 」。
![程序员小航](https://liuzhihang.com/themes/theme-hao/assets/images/wechat/wechat1.png)
- 发送 "hao 群" 可以加群 (群验证信息最好是个人网站)
- 发送"加好友",可以加我微信,我拉你进群 (群二维码失效时)
> 卖服务器的广告人,就不要加了。
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
本工具使用 JetBrains IDEA 进行开发
----
<a href="https://www.jetbrains.com/?from=Toolkit"><img src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/jetbrains-logo-MrNwcp.png" width="20%" height="20%"></a><a href="https://www.jetbrains.com/?from=Toolkit"><img src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/idea-logo-XpnqgG.png" width="20%" height="20%"> </a>
<a href="https://www.jetbrains.com/?from=Toolkit"><img src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/jetbrains-logo-MrNwcp.png" width="10%" height="10%"></a>
<a href="https://www.jetbrains.com/?from=Toolkit"><img src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/idea-logo-XpnqgG.png" width="10%" height="10%"> </a>

View File

@ -1,6 +1,6 @@
{
"name": "halo-theme-hao",
"version": "1.1.3",
"version": "1.1.5",
"dependencies": {
}
}

View File

@ -458,6 +458,11 @@ spec:
label: 分类数量
value: -1
help: "小于 0 则展示全部分类"
- $formkit: number
name: newcommentnumber
label: 评论数量
value: 5
help: "最新评论数量, 小于 0 则展示5条评论"
- group: footer
label: 页脚
@ -466,7 +471,7 @@ spec:
name: centerImg
label: 社交媒体中间logo
help: logo图片链接
placeholder: 请填写logo图片链接
placeholder: 请填写logo图片链接
- $formkit: repeater
name: socialMediaLeft
label: 社交媒体(左)
@ -628,7 +633,7 @@ spec:
- label: 跳转链接
value: normal
- label: 图片
value: image
value: image
- $formkit: menuRadio
name: menu
label: 底部相关链接
@ -645,8 +650,8 @@ spec:
name: fetchUrl
value: "`https://moments.0206.ink/randomfriend?num=3`"
label: 页脚友链地址
placeholder: 请输入页脚友链地址
help: 注意格式 (`友链地址`)
placeholder: 请输入页脚友链地址
help: 注意格式 (`友链地址`)
- group: post
label: 文章
@ -661,6 +666,16 @@ spec:
- label: 关闭
value: false
help: "文章主色匹配图片颜色"
- $formkit: radio
name: summarize
label: 文章摘要
value: false
options:
- label: 打开
value: true
- label: 关闭
value: false
help: "是否显示文章摘要"
- $formkit: number
name: recommendQuantity
label: 阅读建议
@ -681,7 +696,7 @@ spec:
- $formkit: radio
name: enable_post_edit
help: 启用文章运营模式与责任,请正确填写链接
value: true
value: false
options:
- label: 启用
value: true
@ -728,6 +743,7 @@ spec:
name: mode
label: 模式
value: local
help: "本地模式需要自己填写文章摘要"
options:
- label: 本地
value: local
@ -767,8 +783,8 @@ spec:
label: 你的博客地址
help: 注意保留最后的斜杠
value: https://xx.xx/
- group: about
label: 个人
formSchema:
@ -846,7 +862,7 @@ spec:
- $formkit: attachment
name: authorCareersBackground
label: 职业生涯背景图
placeholder: 建议找个透明图
placeholder: 建议找个透明图
- $formkit: select
name: personalities
label: 人格
@ -937,7 +953,7 @@ spec:
label: 爱好游戏背景
placeholder: 请输入内容
value: https://img.zhheo.com/i/2022/08/31/630efa7ae39fe.webp
- $formkit: group
name: game2
label: 爱好游戏2相关配置
@ -1019,7 +1035,7 @@ spec:
name: music_link
label: 音乐偏好按钮链接
placeholder: 请输入内容
value:
value:
- $formkit: attachment
name: music_bg
label: 音乐偏好背景
@ -1068,7 +1084,7 @@ spec:
- $formkit: color
name: authorInfoColor
label: 内容颜色
placeholder: 请输入内容
placeholder: 请输入内容
- $formkit: textarea
name: xjlc
label: 心路历程
@ -1086,7 +1102,7 @@ spec:
name: content
label: 内容
placeholder: 请输入内容
value: 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。
value: 感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。
- $formkit: group
name: reward
label: 打赏按钮
@ -1096,7 +1112,7 @@ spec:
wxPay:
alipay:
enable_reward_wz:
reward_md_url:
reward_md_url:
children:
- $formkit: radio
name: enable_reward_wz
@ -1162,7 +1178,7 @@ spec:
value: "Y"
- label:
value: "N"
- group: style
label: 样式WIP
formSchema:
@ -1197,7 +1213,7 @@ spec:
- $formkit: radio
name: switch
label: 开关WIP
value: true
value: false
options:
- label: 打开
value: true
@ -1314,9 +1330,9 @@ spec:
name: apiurl
value: "`https://moments.0206.ink/`"
label: token地址
placeholder: 请输入token地址
help: 注意格式 (`token地址`)
placeholder: 请输入token地址
help: 注意格式 (`token地址`)
- group: comments
label: 评论
formSchema:

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@
th:href="@{${post.status.permalink}}"
th:text="${post.spec.title}">
</a>
<!-- <div class="content" th:text="${post.status.excerpt}"></div> -->
<div class="content" th:if="${theme.config.post.summarize}" th:text="${post.status.excerpt}"></div>
</div>
@ -87,4 +87,4 @@
</th:block>
</html>
</html>

View File

@ -13,7 +13,7 @@
let basicWordCount = [[${theme.config.aiDescription.basicWordCount}]] // 最低获取字符数, 最小1000, 最大1999
let btnLink = "[[${theme.config.aiDescription.btnLink}]]"
let gptName = "[[${theme.config.aiDescription.gptName}]]"
let modeName = "[[${theme.config.aiDescription.modeName}]]" //默认模式 可选值: tianli/local
let modeName = "[[${theme.config.aiDescription.mode}]]"
let switchBtn = [[${theme.config.aiDescription.switchBtn}]] //# 可以配置是否显示切换按钮 以切换tianli/local
let keys = "[[${theme.config.aiDescription.key}]]"
let Referers = "[[${theme.config.aiDescription.Referer}]]"

View File

@ -3,23 +3,42 @@
<!-- 归档 -->
<div class="card-widget card-recent-post" th:fragment="comments">
<div class="item-headline"><i class="iconfont icon-comment-dots"></i><span>最新评论</span></div>
<div class="aside-list">
<div class="aside-list" id="newcomm">
<div class="aside-list-item">
<a class="thumbnail" href="/404.html">
<img loading="lazy" alt="dasda" src="https://seccdn.libravatar.org/avatar/7d88658473effdd6b068e181b9636878?d=robohash">
</a>
<div class="content">
<a class="comment" href="/messageboard/#635ba6370ccf12000f30a175" title="test">
评论模块未完成
</a>
<div class="name">
<span>liuzhihang / </span>
<time datetime="2022-10-28T09:51:51.581Z">20 小時前</time>
</div>
</div>
</div>
</div>
</div>
</html>
<script th:src="@{/assets/libs/twikoo/twikoo.all.min.js}"></script>
<script th:if="${theme.config.comments.twikoo && #strings.equals(theme.config.comments.use, 'Twikoo') && not #strings.isEmpty(theme.config.comments.envId)}">
const pagesize = [[${theme.config.sidebar.newcommentnumber}]];
const defaultpagesize = 5;
const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize;
twikoo.getRecentComments({
envId: [[${ theme.config.comments.envId }]], // 环境 ID
// region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai如果您的环境地域不是上海需传此参数
pageSize: finalpagesize, // 获取多少条默认10最大100
includeReply: false // 是否包括最新回复默认false
}).then(function (res) {
let commenthtml = '';
res.forEach((items)=>{
commenthtml += `<div class="aside-list-item">
<a class="thumbnail" href="${items.url}">
<img loading="lazy" alt="dasda" src="${items.avatar}">
</a>
<div class="content">
<a class="comment" style="display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;" href="${items.url}" title="test">
${items.commentText}
</a>
<div class="name">
<span>${items.nick} / </span>
<time datetime="${items.created}">${items.relativeTime}</time>
</div>
</div>
</div>`
});
document.querySelector('#newcomm').innerHTML = commenthtml;
}).catch(function (err) {
// 发生错误
console.error(err);
});
</script>
</html>

View File

@ -97,7 +97,6 @@
<main class="layout" id="content-inner" th:classappend="${theme.config.sidebar.location}">
<div id="post">
<!-- 文章ai摘要 -->
<div class="post-ai" th:if="${theme.config.aiDescription.enable}">
@ -105,7 +104,9 @@
<div class="ai-title-text">AI-摘要</div>
<div th:if="${theme.config.aiDescription.switchBtn}" id="ai-Toggle">切换</div>
<i class="anzhiyufont anzhiyu-icon-arrow-rotate-right"></i>
<div class="ai-tag" id="ai-tag">[[${theme.config.aiDescription.gptName}]] GPT</div>
<div th:if="${#strings.equals(theme.config.aiDescription.mode, 'local')}" class="ai-tag" id="ai-tag">[[${theme.config.aiDescription.gptName}]] GPT</div>
<div th:if="${#strings.equals(theme.config.aiDescription.mode, 'tianli')}" class="ai-tag" id="ai-tag">Tianli GPT</div>
</div>
<div class="ai-explanation" style="display: block;">AI初始化中...</div>
<div class="ai-btn-box">
@ -144,7 +145,7 @@
<img alt="微信" class="post-qr-code-img"
th:src="${theme.config.aboutReward.reward.wxPay}"></a>
<div class="post-qr-code-desc">微信</div>
</li>
</li>
<li class="reward-item"><a th:href="@{${theme.config.aboutReward.reward.alipay}}"
target="_blank"><img alt="支付宝" class="post-qr-code-img"
th:src="${theme.config.aboutReward.reward.alipay}"></a>
@ -196,7 +197,7 @@
<a class="post-meta__tags" th:each="tag : ${post.tags}"
th:href="@{${tag.status.permalink}}">
<span class="tags-punctuation">[[${tag.spec.displayName}]]</span>
<span class="tagsPageCount" th:text="${tag.status.visiblePostCount}"></span>
</a>
</div>
@ -225,17 +226,21 @@
</div>
</div>
<nav class="pagination-post" id="pagination"
th:with="postCursor = ${postFinder.cursor(post.metadata.name)}">
<div class="prev-post pull-left">
th:with="postCursor = ${postFinder.cursor(post.metadata.name)}">
<div th:class="${postCursor.hasPrevious()==true && postCursor.hasNext()==false} ? 'prev-post2 pull-left postcarnepre' : 'prev-post pull-left'">
<a th:if="${postCursor.hasPrevious()}" th:href="@{${postCursor.previous.status.permalink}}">
<img alt="cover" id="preimg" class="nolazyload"
th:src="${#strings.isEmpty(postCursor.previous.spec.cover) ? theme.config.layout.postRandomImg : postCursor.previous.spec.cover}">
<div class="pagination-info">
<div class="label">上一篇</div>
<div class="prev_info" th:text="${postCursor.previous.spec.title}"></div>
</div>
</a>
</div>
<div class="next-post pull-right">
<div th:class="${postCursor.hasPrevious()==false && postCursor.hasNext()==true} ? 'next-post2 pull-right postcarnepre':'next-post pull-right'">
<a th:if="${postCursor.hasNext()}" th:href="@{${postCursor.next.status.permalink}}">
<img alt="cover" id="preimg" class="nolazyload"
th:src="${#strings.isEmpty(postCursor.next.spec.cover) ? theme.config.layout.postRandomImg : postCursor.next.spec.cover}">
<div class="pagination-info">
<div class="label">下一篇</div>
<div class="next_info" th:text="${postCursor.next.spec.title}"></div>
@ -254,13 +259,13 @@
<!-- 建议阅读,这里可以自定义文章数量,然后遍历展示 -->
<div th:each="recommandPost :${recommandPosts}">
<a th:href="@{${recommandPost.status.permalink}}" th:title="${recommandPost.spec.title}">
<img alt="cover" class="cover" loading="lazy"
th:src="${#strings.isEmpty(recommandPost.spec.cover) ? theme.config.layout.postRandomImg : recommandPost.spec.cover}">
<div class="content is-center">
<div class="date"><i class="far fa-calendar-alt fa-fw"></i>
<img alt="cover" class="cover" loading="lazy" id="preimg"
th:src="${#strings.isEmpty(recommandPost.spec.cover) ? theme.config.layout.postRandomImg : recommandPost.spec.cover}">
<div class="content is-center" >
<div class="date" style="color: white"><i class="far fa-calendar-alt fa-fw"></i>
[[${#dates.format(recommandPost.spec.publishTime,'yyyy-MM-dd HH:mm:ss')}]]
</div>
<div class="title" th:text="${recommandPost.spec.title}"></div>
<div class="title" style="color: white" th:text="${recommandPost.spec.title}"></div>
</div>
</a>
</div>
@ -284,7 +289,7 @@
<halo:comment group="content.halo.run" kind="SinglePage" th:attr="name='links'"
colorScheme="document.documentElement.getAttribute('data-theme')" />
</div>
</div>
<!-- 侧栏 -->
@ -298,4 +303,4 @@
</th:block>
</html>
</html>

View File

@ -21,11 +21,11 @@ spec:
description: 关于页面
screenshot:
file: about.html
description: Halo 2.0 Theme base on Thymeleaf, Referring to Butterfly and Heo
description: Halo 2.x Theme base on Thymeleaf, Referring to Butterfly and Heo
logo: 'https://liuzhihang.com/themes/theme-hao/assets/images/hao-logo.jpg'
website: 'https://liuzhihang.com'
repo: 'https://github.com/liuzhihang/halo-theme-hao'
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: 1.1.2
require: 2.0.0
version: 1.1.5
require: 2.x