Merge branch 'liuzhihang:main' into main
This commit is contained in:
commit
19703b3756
14
README.md
14
README.md
|
@ -55,9 +55,15 @@
|
||||||
对 [Hexo-Theme-Butterfly](https://github.com/liuzhihang/halo-theme-hao)
|
对 [Hexo-Theme-Butterfly](https://github.com/liuzhihang/halo-theme-hao)
|
||||||
主题的魔改版本。
|
主题的魔改版本。
|
||||||
|
|
||||||
## 🛠 安装
|
## 🚨 注意事项(看我看我)
|
||||||
|
1. **安装后请到主题设置页面,将每个设置项都保存一下!!!**
|
||||||
|
2. **建站时间必填**
|
||||||
|
3. 如果安装主题后报错,请仔细查阅[主题说明](https://github.com/liuzhihang/halo-theme-hao)与[更新说明](https://github.com/liuzhihang/halo-theme-hao/releases)!!!
|
||||||
|
4. 如果还未解决,可以加群求助!!!
|
||||||
|
5. 如果群友也解决不了,再考虑提ISSUE!!!
|
||||||
|
6. `1.3.1`及以上版本需要`Halo`版本>=`2.8.0`
|
||||||
|
|
||||||
> **安装后请到主题设置页面,将每个设置项都保存一下!!!**
|
## 🛠 安装
|
||||||
|
|
||||||
### 🚗 自动安装
|
### 🚗 自动安装
|
||||||
|
|
||||||
|
@ -89,12 +95,12 @@
|
||||||
|
|
||||||
- 评论功能 [plugin-comment-widget](https://github.com/halo-sigs/plugin-comment-widget/releases)
|
- 评论功能 [plugin-comment-widget](https://github.com/halo-sigs/plugin-comment-widget/releases)
|
||||||
- 搜索功能 [plugin-search-widget](https://github.com/halo-sigs/plugin-search-widget/releases)
|
- 搜索功能 [plugin-search-widget](https://github.com/halo-sigs/plugin-search-widget/releases)
|
||||||
- 友链页面 [plugin-links](https://github.com/chengzhongxue/plugin-links)(魔改版本)
|
- 友链页面 [plugin-links](https://github.com/halo-sigs/plugin-links)
|
||||||
- 瞬间页面 [plugin-moments](https://github.com/halo-sigs/plugin-moments)
|
- 瞬间页面 [plugin-moments](https://github.com/halo-sigs/plugin-moments)
|
||||||
- 代码高亮 [plugin-prismjs](https://github.com/liuzhihang/plugin-prismjs)
|
- 代码高亮 [plugin-prismjs](https://github.com/liuzhihang/plugin-prismjs)
|
||||||
- 图片懒加载 [plugin-lazyload](https://github.com/liuzhihang/plugin-lazyload)
|
- 图片懒加载 [plugin-lazyload](https://github.com/liuzhihang/plugin-lazyload)
|
||||||
- 追番插件 [plugin-bilibili-bangumi](https://github.com/Roozenlz/plugin-bilibili-bangumi)
|
- 追番插件 [plugin-bilibili-bangumi](https://github.com/Roozenlz/plugin-bilibili-bangumi)
|
||||||
- 图库插件 [plugin-photos](https://github.com/chengzhongxue/plugin-photos)(魔改版本)
|
- 图库插件 [plugin-photos](https://github.com/halo-sigs/plugin-photos)
|
||||||
|
|
||||||
> 更多插件请参见:https://github.com/halo-sigs/awesome-halo
|
> 更多插件请参见:https://github.com/halo-sigs/awesome-halo
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ spec:
|
||||||
value:
|
value:
|
||||||
enable_above:
|
enable_above:
|
||||||
typed:
|
typed:
|
||||||
|
enable_typed_random:
|
||||||
enable_above_video:
|
enable_above_video:
|
||||||
index_img:
|
index_img:
|
||||||
phone_index_img:
|
phone_index_img:
|
||||||
|
@ -115,10 +116,24 @@ spec:
|
||||||
children:
|
children:
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: text
|
name: text
|
||||||
label: 文字
|
label: 自定义文字
|
||||||
placeholder: 请输入文字
|
placeholder: 请输入自定义文字
|
||||||
|
- $formkit: radio
|
||||||
|
label: 随机文字
|
||||||
|
if: $get(enable_above).value
|
||||||
|
name: enable_typed_random
|
||||||
|
key: enable_typed_random
|
||||||
|
id: enable_typed_random
|
||||||
|
value: false
|
||||||
|
help: 如果配置了自定义文字,优先展示自定义文字
|
||||||
|
options:
|
||||||
|
- label: 启用
|
||||||
|
value: true
|
||||||
|
- label: 禁用
|
||||||
|
value: false
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
if: $get(enable_above).value
|
if: $get(enable_above).value
|
||||||
|
label: 背景模式
|
||||||
name: enable_above_video
|
name: enable_above_video
|
||||||
key: enable_above_video
|
key: enable_above_video
|
||||||
id: enable_above_video
|
id: enable_above_video
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
margin: var(--album-spacing-xxl) 0 0
|
margin: var(--album-spacing-xxl) 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,13 +242,14 @@
|
||||||
</style>
|
</style>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
function subtitleType() {
|
function subtitleType() {
|
||||||
|
if([[${theme.config.top.above.enable_typed_random}]]){
|
||||||
fetch("https://v1.hitokoto.cn").then((t => t.json())).then((t => {
|
fetch("https://v1.hitokoto.cn").then((t => t.json())).then((t => {
|
||||||
{
|
{
|
||||||
const e = "出自 " + t.from;
|
const e = "出自 " + t.from;
|
||||||
const n = [[${theme.config.top.above.typed}]].map((item) => {
|
const n = [[${theme.config.top.above.typed}]].map((item) => {
|
||||||
return item.realNode.text;
|
return item.realNode.text;
|
||||||
});
|
});
|
||||||
n.unshift(t.hitokoto, e), window.typed = new Typed("#subtitle", {
|
n.push(t.hitokoto, e), window.typed = new Typed("#subtitle", {
|
||||||
strings: n,
|
strings: n,
|
||||||
startDelay: 300,
|
startDelay: 300,
|
||||||
typeSpeed: 100,
|
typeSpeed: 100,
|
||||||
|
@ -257,8 +258,23 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
}else{
|
||||||
|
const n = [[${theme.config.top.above.typed}]].map((item) => {
|
||||||
|
return item.realNode.text;
|
||||||
|
});
|
||||||
|
window.typed = new Typed("#subtitle", {
|
||||||
|
strings: n,
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: !0,
|
||||||
|
backSpeed: 50
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// 防止加载文字太短时第一个自定义文字显示不出来
|
||||||
|
setTimeout(()=>{
|
||||||
"function" == typeof Typed ? subtitleType() : getScript("https://npm.elemecdn.com/typed.js@2.0.12/lib/typed.min.js").then(subtitleType)
|
"function" == typeof Typed ? subtitleType() : getScript("https://npm.elemecdn.com/typed.js@2.0.12/lib/typed.min.js").then(subtitleType)
|
||||||
|
},1800)
|
||||||
</script>
|
</script>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
Loading…
Reference in New Issue