支持标题栏固定

This commit is contained in:
j m 2024-05-17 08:07:48 +08:00
parent e9d9371040
commit 6ddbf93814
6 changed files with 29 additions and 16 deletions

View File

@ -58,6 +58,16 @@ spec:
name: cloud_by_url
label: '云服务提供商 URL'
placeholder: '请输入链接地址'
- $formkit: radio
name: header_fixed
label: 固定标题栏
value: false
help: 固定标题栏时不会随着页面滚动而隐藏,始终显示标题栏。
options:
- label: 不固定
value: false
- label: 固定
value: true
- $formkit: radio
name: footer_center
label: 页脚对齐方式

View File

@ -36,13 +36,12 @@ lit-toast-container, halo-contact-form-toast-container {
filter: grayscale(1) !important;
}
body > .footer, body > .navbar, body > .section {
opacity: 0;
transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.navbar-above {
transform: translateY(-100%);
&.animation {
transform: translateY(-100%);
}
}
.load-block {
@ -95,13 +94,13 @@ html {
text-size-adjust: 100%;
&.loaded {
body > .footer, body > .navbar, body > .section {
opacity: 1;
}
.navbar-above {
transform: translateY(0);
z-index: 100;
&.animation {
transform: translateY(0);
}
}
.card, .load-block {
@ -123,7 +122,11 @@ html {
&:not(.disable-scroll) {
body.move-up .navbar-above {
transform: translate3d(0, -100%, 0);
opacity: 1;
&.animation {
transform: translate3d(0, -100%, 0);
}
}
.actions.show {

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<header class="navbar" xmlns:th="https://www.thymeleaf.org">
<div class="navbar-above">
<header class="navbar" th:classappend="${!theme.config.basic_info.header_fixed}? 'animation'" xmlns:th="https://www.thymeleaf.org">
<div class="navbar-above" th:classappend="${!theme.config.basic_info.header_fixed}? 'animation'">
<div th:class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }">
<i class="ri-list-unordered navbar-slideicon"></i>
<a class="navbar-item logo-title" th:href="${site.url}">

View File

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

View File

@ -1 +1 @@
1.2.2
1.2.1