适配Halo 2.20.0及以上版本
detailed: 1.更新主题最低Halo版本要求为>=2.20.0。 2.适配Halo 2.20.0版本的登录退出方式。 3.移除了配置静态资源中的onmicrosoft和cbd选项。
This commit is contained in:
parent
ab1ccd77c9
commit
7be697e633
@ -32,12 +32,20 @@
|
||||
## 🚨 注意事项(看我看我)
|
||||
|
||||
1. **建站时间必填**
|
||||
|
||||
2. 如果安装主题后报错,请仔细查阅<a href="https://gitea.uptoz.cn/UPToZ/halo-theme-hao" target="_blank" rel="noopener noreferrer">主题说明</a>
|
||||
与<a href="https://gitea.uptoz.cn/UPToZ/halo-theme-hao/releases" target="_blank" rel="noopener noreferrer">更新说明</a>!!!
|
||||
|
||||
3. 建议每次更新主题后重载一次主题配置,然后重启Halo,以降低旧数据缓存对程序带来的影响。
|
||||
|
||||
4. 如果遇到问题解决不了,可以提 <a href="https://gitee.com/uptoz/halo-theme-hao/issues" target="_blank" rel="noopener noreferrer">ISSUE</a>
|
||||
|
||||
5. `1.0.0`及以上版本需要`Halo`版本>=`2.14.0`
|
||||
|
||||
`1.0.3`及以上版本需要`Halo`版本>=`2.20.0`
|
||||
|
||||
6. **若安装主题后出现500错误,请到主题设置页面,将每个设置项都保存一下!!!**
|
||||
|
||||
7. 此主题`所有版本`必须使用`本地资源`。
|
||||
|
||||
### 🔌 插件依赖
|
||||
|
@ -3063,10 +3063,6 @@ spec:
|
||||
options:
|
||||
- label: 本地
|
||||
value: local
|
||||
- label: onmicrosoft
|
||||
value: onmicrosoft
|
||||
- label: cbd
|
||||
value: cbd
|
||||
- label: 自定义
|
||||
value: custom
|
||||
- $formkit: url
|
||||
|
@ -33,7 +33,7 @@
|
||||
font-size: 14px;
|
||||
color: var(--heo-card-bg);
|
||||
font-weight: bold;
|
||||
top: 10px;
|
||||
top: 7px;
|
||||
white-space: nowrap;
|
||||
transition: left 0.5s linear;
|
||||
visibility: hidden;
|
||||
|
@ -1,8 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" th:fragment="layout(content, htmlType, title, head)" xmlns:th="http://www.thymeleaf.org"
|
||||
th:with="assets_link=${theme.config.other.staticResource.use == 'onmicrosoft' ? 'https://npm.onmicrosoft.cn/hao-theme-static@' + theme.spec.version +'/templates/assets' :
|
||||
theme.config.other.staticResource.use == 'cbd' ? 'https://cdn.cbd.int/hao-theme-static@' + theme.spec.version +'/templates/assets' :
|
||||
theme.config.other.staticResource.use == 'custom' ? theme.config.other.staticResource.cdn_link : #theme.assets('/')},
|
||||
th:with="assets_link=${theme.config.other.staticResource.use == 'custom' ? theme.config.other.staticResource.cdn_link : #theme.assets('/')},
|
||||
theme_version = ${ theme.config.other.staticResource.use == 'local' ? '?v='+ theme.spec.version : ''},
|
||||
isLazyload = ${theme.config.other.vanillaLazyload.enable},
|
||||
loadingImg = ${theme.config.other.vanillaLazyload.loadingImg},
|
||||
|
@ -47,13 +47,15 @@
|
||||
<a class="back-menu-item" rel="external nofollow" target="_blank" href="/console">
|
||||
<span class="back-menu-item-text">控制台</span>
|
||||
</a>
|
||||
<a class="back-menu-item" rel="external nofollow"
|
||||
href="javascript:$.ajax({type: 'post',url:'/logout',headers:{'X-Xsrf-Token':document.cookie.split('; ').find((row) => row.startsWith('XSRF-TOKEN'))?.split('=')[1] || ''},success: function() {window.location.reload();},error: function(xhr, status, error) {console.error('退出登录时发生错误:', error);}});">
|
||||
<a class="back-menu-item" rel="external nofollow" href="/logout">
|
||||
<span class="back-menu-item-text">退出登录</span>
|
||||
</a>
|
||||
</th:block>
|
||||
<!-- <a sec:authorize="isAnonymous()" class="back-menu-item" rel="external nofollow" target="_blank"
|
||||
href="/console/login"> -->
|
||||
<a sec:authorize="isAnonymous()" class="back-menu-item" rel="external nofollow" target="_blank"
|
||||
href="/console/login">
|
||||
href="/login"
|
||||
onclick="this.href = '/login?redirect_uri=' + encodeURIComponent(window.location.href)">
|
||||
<span class="back-menu-item-text">登录</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@ spec:
|
||||
settingName: "theme-hao-setting"
|
||||
configMapName: "theme-hao-configMap"
|
||||
version: "1.0.3-ce"
|
||||
require: ">=2.15.0"
|
||||
require: ">=2.20.0"
|
||||
license:
|
||||
- name: "CC BY-SA 4.0"
|
||||
url: "https://gitee.com/uptoz/halo-theme-hao/blob/main/LICENSE"
|
||||
|
Loading…
Reference in New Issue
Block a user