feat: support fullscreen layout
This commit is contained in:
@@ -39,6 +39,12 @@ spec:
|
||||
value:
|
||||
help: 填写的值为 max-width 属性的值
|
||||
|
||||
- $formkit: checkbox
|
||||
label: 启用全屏布局
|
||||
name: fullscreen_layout
|
||||
value: false
|
||||
help: 开启后隐藏左右侧边栏并让正文区域占满可用宽度
|
||||
|
||||
- $formkit: checkbox
|
||||
label: 使用系统字体
|
||||
name: system_font_enable
|
||||
|
||||
@@ -99,6 +99,24 @@ body {
|
||||
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) {
|
||||
.sidebar-left,
|
||||
.sidebar-right {
|
||||
|
||||
@@ -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) {
|
||||
.toc.toc-visible {
|
||||
border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground);
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body th:attr="layout_mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'}">
|
||||
<div class="page">
|
||||
<header role="banner">
|
||||
<div id="header-slot" aria-hidden="true"></div>
|
||||
|
||||
Reference in New Issue
Block a user