feat: support fullscreen layout

This commit is contained in:
Erzbir
2026-05-16 15:52:23 +08:00
parent c7c8239c5f
commit 94af42a8bc
4 changed files with 33 additions and 3 deletions
+6
View File
@@ -39,6 +39,12 @@ spec:
value: value:
help: 填写的值为 max-width 属性的值 help: 填写的值为 max-width 属性的值
- $formkit: checkbox
label: 启用全屏布局
name: fullscreen_layout
value: false
help: 开启后隐藏左右侧边栏并让正文区域占满可用宽度
- $formkit: checkbox - $formkit: checkbox
label: 使用系统字体 label: 使用系统字体
name: system_font_enable name: system_font_enable
+18
View File
@@ -99,6 +99,24 @@ body {
flex-direction: column; flex-direction: column;
} }
body[layout_mode='fullscreen'] {
.wrapper {
display: block;
}
.sidebar-left,
.sidebar-right {
display: none;
width: 0;
padding: 0;
}
.container {
width: 100%;
max-width: none !important;
}
}
@media (max-width: 1024px) { @media (max-width: 1024px) {
.sidebar-left, .sidebar-left,
.sidebar-right { .sidebar-right {
+6
View File
@@ -113,6 +113,12 @@
} }
} }
body[layout_mode='fullscreen'] {
.toc.toc-visible {
border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground);
}
}
@media (max-width: 1400px) { @media (max-width: 1400px) {
.toc.toc-visible { .toc.toc-visible {
border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground); border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground);
+1 -1
View File
@@ -144,7 +144,7 @@
</script> </script>
</head> </head>
<body> <body th:attr="layout_mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'}">
<div class="page"> <div class="page">
<header role="banner"> <header role="banner">
<div id="header-slot" aria-hidden="true"></div> <div id="header-slot" aria-hidden="true"></div>