diff --git a/settings.yaml b/settings.yaml index 4a112641..d607c2f3 100644 --- a/settings.yaml +++ b/settings.yaml @@ -131,6 +131,17 @@ spec: - group: sidebar label: 侧边栏 formSchema: + - $formkit: select + name: location + label: 侧边栏位置 + value: "right" + options: + - value: "hide" + label: "隐藏" + - value: "right" + label: "右侧" + - value: "left" + label: "左侧" - $formkit: textarea name: widgets label: 小部件(无效) diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 5ae2ce89..24fa49fc 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -7167,6 +7167,28 @@ span.fund_name { width: calc(100% - 300px); } +/* 当隐藏边栏时,显示 100% */ +.layout.hide > div:first-child { + width: 100%; +} + +/* 侧边栏在左侧时,显示 100% */ +.layout.left > div:first-child { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -o-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; +} + +/* 侧栏在左侧时,关闭左边距,打开右边距 */ +.layout.left .aside-content { + padding-right: 15px; + padding-left: 0px !important; +} + + div#categoryList { display: flex; width: 100%; diff --git a/templates/index.html b/templates/index.html index 989c5239..461baa26 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,7 +15,7 @@
-
+
diff --git a/templates/modules/aside.html b/templates/modules/aside.html index a57202a7..f5bbf4d8 100644 --- a/templates/modules/aside.html +++ b/templates/modules/aside.html @@ -1,7 +1,7 @@ -
+
diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 90474b00..4eadcde1 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -47,7 +47,6 @@
-