refactor: simplify shared site layout
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ spec:
|
|||||||
label: 启用全屏布局
|
label: 启用全屏布局
|
||||||
name: fullscreen_layout
|
name: fullscreen_layout
|
||||||
value: false
|
value: false
|
||||||
help: 开启后隐藏左右侧边栏并让正文区域占满可用宽度
|
help: 开启后让正文区域占满可用宽度
|
||||||
|
|
||||||
- $formkit: checkbox
|
- $formkit: checkbox
|
||||||
label: 表格宽度铺满父元素
|
label: 表格宽度铺满父元素
|
||||||
|
|||||||
@@ -70,13 +70,13 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-shell {
|
.wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-frame {
|
.container {
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
padding: var(--spacing-theme-container-padding);
|
padding: var(--spacing-theme-container-padding);
|
||||||
@@ -90,7 +90,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body[data-layout-mode='fullscreen'] {
|
body[data-layout-mode='fullscreen'] {
|
||||||
.site-frame {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
@@ -111,13 +111,13 @@ body[data-table-full-width='true'] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.site-frame {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.site-frame {
|
.container {
|
||||||
padding: var(--spacing-theme-container-padding-mobile);
|
padding: var(--spacing-theme-container-padding-mobile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,8 +118,8 @@
|
|||||||
|
|
||||||
<body th:attr="data-layout-mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
<body th:attr="data-layout-mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
||||||
data-table-full-width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
data-table-full-width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
||||||
<div class="site-shell">
|
<div class="wrapper">
|
||||||
<div class="site-frame"
|
<div class="container"
|
||||||
th:attr="style=${theme.config.style.fullscreen_layout or #strings.isEmpty(theme.config.style.max_width) ? null : 'max-width:' + theme.config.style.max_width}">
|
th:attr="style=${theme.config.style.fullscreen_layout or #strings.isEmpty(theme.config.style.max_width) ? null : 'max-width:' + theme.config.style.max_width}">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<th:block th:replace="~{modules/header :: header}"/>
|
<th:block th:replace="~{modules/header :: header}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user