Merge pull request #49 from zsjy/dev

1.3.9
This commit is contained in:
宏尘 2025-02-22 11:29:49 +08:00 committed by GitHub
commit b224a65fc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 65 additions and 5 deletions

View File

@ -1457,6 +1457,57 @@ spec:
value: '您即将离开<span>{title}</span>,去往:<span>{url}</span>' value: '您即将离开<span>{title}</span>,去往:<span>{url}</span>'
placeholder: '请输入安全链接页面跳转提示区域的文本描述' placeholder: '请输入安全链接页面跳转提示区域的文本描述'
help: '"<span></span>"包裹时字体颜色为主题色,“ {title} ”表示站点主标题,“ {url} ”表示跳转URL区分大小写。默认值“您即将离开<span>{title}</span>,去往:<span>{url}</span>”' help: '"<span></span>"包裹时字体颜色为主题色,“ {title} ”表示站点主标题,“ {url} ”表示跳转URL区分大小写。默认值“您即将离开<span>{title}</span>,去往:<span>{url}</span>”'
- group: pwa
label: 'PWA配置'
formSchema:
- $formkit: radio
name: enable_pwa
id: enable_pwa
label: 开启 PWA 配置
value: false
help: '开启 PWA请先参考 https://www.hcjike.com/archives/MNdz7kZ6 页面的相关说明。'
options:
- value: true
label: 开启
- value: false
label: 关闭
- $formkit: attachment
name: manifest_file
if: $get(enable_pwa).value
accepts:
- "application/json"
label: manifest.json 文件路径
validation: required
placeholder: '请输入/选择 manifest.json 文件'
help: '请输入或选择一个 manifest.json 文件。该文件的创建方法可参考 https://www.hcjike.com/archives/MNdz7kZ6 页面的相关说明。'
- $formkit: color
name: theme_color
if: $get(enable_pwa).value
label: 主题颜色
validation: required
help: 设置浏览器地址栏、工具栏或状态栏的主题颜色。
value: '#50bfff'
- $formkit: select
name: apple_status_bar_style
if: $get(enable_pwa).value
label: iOS 设备状态栏样式
validation: required
value: 'black'
help: '控制 iOS 设备上 Web 应用的状态栏样式。'
options:
- value: 'default'
label: 白色文字,灰色状态栏
- value: 'black'
label: 白色文字,黑色状态栏
- value: 'black-translucent'
label: 白色文字,半透明黑色状态栏
- $formkit: attachment
name: apple_touch_icon
if: $get(enable_pwa).value
label: iOS 设备显示图标
validation: required
placeholder: '请输入/选择图标文件'
help: '为 iOS 设备设置添加到主屏幕时的图标。'
- group: custom - group: custom
label: '定制主题' label: '定制主题'
formSchema: formSchema:

View File

@ -390,7 +390,7 @@ const commonContext = {
} }
const grt = new Date(loveTime) const grt = new Date(loveTime)
setInterval(function () { setInterval(function () {
let now = Date.now() let now = new Date(Date.now())
let difference = parseInt((now - grt) / 1000) let difference = parseInt((now - grt) / 1000)
let seconds = difference % 60 let seconds = difference % 60
difference = parseInt(difference / 60) difference = parseInt(difference / 60)

File diff suppressed because one or more lines are too long

View File

@ -22,6 +22,15 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
<meta name="twitter:description" th:content="${description}"> <meta name="twitter:description" th:content="${description}">
<meta name="twitter:image" th:content="${#strings.isEmpty(site.favicon) ? '' : #strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}"> <meta name="twitter:image" th:content="${#strings.isEmpty(site.favicon) ? '' : #strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}">
<th:block th:if="${theme.config.pwa.enable_pwa}">
<link rel="manifest" th:href="${theme.config.pwa.manifest_file}"/>
<link rel="apple-touch-icon" th:href="${theme.config.pwa.apple_touch_icon}">
<meta name="theme-color" th:content="${theme.config.pwa.theme_color}"/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" th:content="${theme.config.pwa.apple_status_bar_style}"/>
</th:block>
<link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(canonical,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}"/> <link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(canonical,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}"/>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/theme.min.css(mew=${theme.spec.version})}"> <link rel="preload stylesheet" as="style" th:href="@{/assets/css/theme.min.css(mew=${theme.spec.version})}">
@ -31,7 +40,7 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
<th:block th:if="${isPost}"> <th:block th:if="${isPost}">
<link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/> <link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/>
<link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}"> <link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}"/>
</th:block> </th:block>
<link rel="stylesheet" th:href="@{/assets/css/mew-custom.min.css(mew=${theme.spec.version})}"> <link rel="stylesheet" th:href="@{/assets/css/mew-custom.min.css(mew=${theme.spec.version})}">

View File

@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap configMapName: theme-dream2-plus-configMap
# 版本号 # 版本号
version: 1.3.8 version: 1.3.9
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.20.0" require: ">=2.20.0"
# 许可 # 许可