Skip to content

Commit

Permalink
🐛 修复1.0.6遗留问题
Browse files Browse the repository at this point in the history
  • Loading branch information
qinhua committed Nov 28, 2021
1 parent 5cbbe2a commit 937c1f9
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 111 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo-theme-joe2.0",
"version": "1.0.6",
"version": "1.0.7",
"description": "A halo theme joe2.0",
"main": "index.js",
"author": "BabyChin",
Expand Down
Binary file added screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 80 additions & 79 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ genernal:
label: 统计代码
type: textarea
placeholder: 请输入统计代码
description: "支持百度或其他平台统计代码(请自行生成),将插入head标签中(后台管理中也可设置,只需设置一处即可)"
description: "支持百度或其他平台统计代码(请自行生成),将插入 head 标签中(后台管理中也可设置,只需设置一处即可)"

# 主题
theme:
Expand Down Expand Up @@ -78,7 +78,7 @@ theme:
type: text
default: "5:00~19:00"
placeholder: "输入格式如:5:00~19:00"
description: "设置浅色模式自动生效的时间范围,范围之外为暗黑模式(仅在主题模式为 “自动模式” 下生效),请严格按照规定格式设置"
description: "设置浅色模式自动生效的时间范围,范围之外为暗黑模式(仅在主题模式为 “自动模式” 下生效),请严格按照规定格式设置,否则会导致报错"
mode_color_light:
name: mode_color_light
label: 主题色(浅色)
Expand Down Expand Up @@ -439,7 +439,8 @@ footer:
label: "自定义博客起始时间"
type: text
default: ""
description: "自定义博客的起始时间/安装时间,作为计算博客运行时间的参照值,请严格按照示例格式填写,否则将导致报错(示例:2021/11/11 6:30)"
placeholder: "示例:2021/11/11 06:30"
description: "自定义博客的起始时间/安装时间,作为计算博客运行时间的参照值,请严格按照示例格式填写,否则将导致报错(示例:2021/11/11 06:30)"
enable_rss:
name: enable_rss
label: 展示RSS
Expand Down Expand Up @@ -1174,7 +1175,7 @@ home:
label: 随机图 API
type: text
default: "https://tu.ltyuanfang.cn/api/fengjing.php"
description: "自定义随机图API,用于填充没有设置封面的 “文章|分类|标签,为空则使用默认随机图 API,免费 API 不会一直可用,请知悉"
description: "自定义随机图API,用于填充没有设置封面的 “文章|分类|标签,为空则使用默认随机图 API,免费 API 不会一直可用,请知悉"
enable_index_list_effect:
name: enable_index_list_effect
label: 开启文章列表动画效果
Expand Down Expand Up @@ -1717,9 +1718,9 @@ post:
passage_rights_content:
name: passage_rights_content
label: 许可协议文案
type: text
type: textarea
default: ""
placeholder: "请输入"
placeholder: "请输入内容"
description: "自定义文章页底部版权模块中的“作品采用”文案,为空则使用默认文案,一般不用设置"
enable_donate:
name: enable_donate
Expand Down Expand Up @@ -2386,7 +2387,7 @@ live2d:
items:
enable_live2d:
name: enable_live2d
label: 开启看板娘
label: 启用看板娘
type: switch
data-type: bool
default: false
Expand All @@ -2395,6 +2396,41 @@ live2d:
label:
- value: false
label:
live2d_showWelcomeMessage:
name: live2d_showWelcomeMessage
label: 进入页面时显示欢迎语
type: switch
data-type: bool
default: true
options:
- value: true
label: 开启
- value: false
label: 关闭
live2d_takagiSize:
name: live2d_takagiSize
label: 看板娘大小
type: text
data-type: string
default: "280x250"
placeholder: 请输入
description: "默认大小为 280x250"
live2d_takagiMinWidth:
name: live2d_takagiMinWidth
label: 显示看板娘的最大宽度
type: text
data-type: string
default: "768px"
placeholder: 请输入
description: '当页面小于指定宽度的时候,隐藏看板娘,输入disable则停用此功能'
live2d_takagiEdgeSide:
name: live2d_takagiEdgeSide
label: 看板娘显示位置
type: text
data-type: string
default: "left:0"
placeholder: 请输入
description: '使用绝对定位 left:0 就代表靠左'
live2d_modelAPI:
name: live2d_modelAPI
label: 看板娘API地址
Expand Down Expand Up @@ -2437,6 +2473,42 @@ live2d:
data-type: long
default: 1
placeholder: 请输入
live2d_modelStorage:
name: live2d_modelStorage
label: 记录ID (刷新后可恢复)
type: switch
data-type: bool
default: false
description: "刷新前记录当前模型ID,刷新后展示对应的模型"
options:
- value: true
label:
- value: false
label:
live2d_takagiDraggable:
name: live2d_takagiDraggable
label: 看板娘拖拽方案
type: select
data-type: string
default: 'disable'
options:
- value: 'disable'
label: 禁用拖拽
- value: 'axis-x'
label: 水平拖拽
- value: 'unlimited'
label: 自由拖拽
live2d_takagiDraggableRevert:
name: live2d_takagiDraggableRevert
label: 松开鼠标还原拖拽位置
type: switch
data-type: bool
default: true
options:
- value: true
label: 开启
- value: false
label: 关闭
live2d_showToolMenu:
name: live2d_showToolMenu
label: 显示工具栏
Expand Down Expand Up @@ -2527,18 +2599,6 @@ live2d:
label:
- value: false
label:
live2d_modelStorage:
name: live2d_modelStorage
label: 记录ID (刷新后可恢复)
type: switch
data-type: bool
default: false
description: "刷新前记录当前模型ID,刷新后展示对应的模型"
options:
- value: true
label:
- value: false
label:
live2d_modelRandMode:
name: live2d_modelRandMode
label: 模型切换类型
Expand Down Expand Up @@ -2616,25 +2676,6 @@ live2d:
label: 开启
- value: false
label: 关闭
live2d_showWelcomeMessage:
name: live2d_showWelcomeMessage
label: 进入页面时显示欢迎语
type: switch
data-type: bool
default: true
options:
- value: true
label: 开启
- value: false
label: 关闭
live2d_takagiSize:
name: live2d_takagiSize
label: 看板娘大小
type: text
data-type: string
default: "280x250"
placeholder: 请输入
description: "默认大小为 280x250"
live2d_takagiTipsSize:
name: live2d_takagiTipsSize
label: 提示框大小
Expand Down Expand Up @@ -2673,46 +2714,6 @@ live2d:
data-type: string
default: "0px"
placeholder: 请输入
live2d_takagiMinWidth:
name: live2d_takagiMinWidth
label: 显示看板娘的最大宽度
type: text
data-type: string
default: "768px"
placeholder: 请输入
description: '当页面小于指定宽度的时候,隐藏看板娘,输入disable则停用此功能'
live2d_takagiEdgeSide:
name: live2d_takagiEdgeSide
label: 看板娘贴边方向
type: text
data-type: string
default: "left:0"
placeholder: 请输入
description: '使用绝对定位 left:0 就代表靠左'
live2d_takagiDraggable:
name: live2d_takagiDraggable
label: 看板娘拖拽方案
type: select
data-type: string
default: 'disable'
options:
- value: 'disable'
label: 禁用拖拽
- value: 'axis-x'
label: 水平拖拽
- value: 'unlimited'
label: 自由拖拽
live2d_takagiDraggableRevert:
name: live2d_takagiDraggableRevert
label: 松开鼠标还原拖拽位置
type: switch
data-type: bool
default: true
options:
- value: true
label: 开启
- value: false
label: 关闭
live2d_aboutPageUrl:
name: live2d_aboutPageUrl
label: 关于页地址
Expand Down Expand Up @@ -3053,7 +3054,7 @@ others:
items:
enable_clean_mode:
name: enable_clean_mode
label: 开启绿色模式
label: 绿色模式
type: switch
data-type: bool
default: false
Expand Down
File renamed without changes
30 changes: 2 additions & 28 deletions source/js/joe.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,31 +546,6 @@ const commonContext = {
$(".tags-cloud-list").remove();
$("#tags-3d .empty").remove();
},
/* 激活Live2d人物 */
initLive2d() {
if (!ThemeConfig.enable_live2d) return;
$.getScript(
"https://cdn.jsdelivr.net/npm/[email protected]/lib/L2Dwidget.min.js",
() => {
L2Dwidget.init({
model: {
jsonPath: Joe.LIVE2D,
scale: 1,
},
mobile: {
show: false,
},
display: {
position: "right",
width: 160,
height: 200,
hOffset: 70,
vOffset: 0,
},
});
}
);
},
/* 首页离屏提示 */
offscreenTip() {
if (!ThemeConfig.enable_offscreen_tip) return;
Expand Down Expand Up @@ -661,8 +636,8 @@ const commonContext = {
/* 初始化网站运行时间 */
initBirthday() {
if (!ThemeConfig.enable_birthday) return;
if(!/^\d+$/g.test(ThemeConfig.birthday)||!/^\d+$/g.test(ThemeConfig.birthday)){
console.error("“自定义博客起始时间” 格式错误,请检查!");
if(!/^\d+$/.test(ThemeConfig.birthday) && !/^(\d{4}\/\d{1,2}\/\d{1,2}\s\d{1,2}:\d{1,2}(:\d{0,2})?)$/.test(ThemeConfig.birthday)){
Qmsg.error("“自定义博客起始时间” 格式错误,请检查!");
return;
}
const birthDay = new Date(
Expand Down Expand Up @@ -840,7 +815,6 @@ const commonContext = {
const omits = [
"loadingBar",
"init3dTag",
"initLive2d",
"foldCode",
"showLoadTime",
"clean",
Expand Down
2 changes: 1 addition & 1 deletion source/js/min/joe.common.min.js

Large diffs are not rendered by default.

Binary file modified source/js/min/joe.common.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion template/macro/banner_item.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a class="item" href="${cur_link}" target="_blank" rel="noopener noreferrer nofollow">
<img width="100%" height="100%" class="thumbnail lazyload" data-src="${cur_img!}" src="${settings.banner_lazyload_img}" alt="${cur_title!'banner'}">
<#if settings.enable_banner_title==true && cur_title!=''>
<div class="title">${cur_title}<</div>
<div class="title">${cur_title}</div>
</#if>
<i class="joe-font joe-icon-zhifeiji"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ logo: https://bbchin.com/logo
website: https://bbchin.com
repo: https://github.com/qinhua/halo-theme-joe2.0
cover: https://cdn.jsdelivr.net/gh/qinhua/halo-theme-joe2.0@master/source/img/dp/welcome.jpg
version: 1.0.6
version: 1.0.7
require: ^1.4.11
# 文章页 meta 变量
postMetaField:
Expand Down

0 comments on commit 937c1f9

Please sign in to comment.