diff --git a/plugins/addon/theme_configurator/template/admin/index.html b/plugins/addon/theme_configurator/template/admin/index.html index 3bce964..513a0bb 100644 --- a/plugins/addon/theme_configurator/template/admin/index.html +++ b/plugins/addon/theme_configurator/template/admin/index.html @@ -60,13 +60,6 @@ 基础配置 - - - - - - SEO设置 - - 其他配置 - - - - - - - - JSON编辑器 + 高级配置
- +
@@ -120,24 +105,23 @@
- +
- + +
+
+ +
- +
-
- - -
-
+
-
- -

SEO设置

+

搜索引擎优化配置

@@ -180,7 +158,7 @@
-
+
@@ -245,7 +223,7 @@
- +
@@ -266,10 +244,7 @@
-
- -

JSON配置编辑器

@@ -323,6 +298,15 @@ }); }); + // 配置项折叠 — 点击 header 切换 + document.addEventListener('click', (e) => { + const header = e.target.closest('.config-item__header'); + if (!header) return; + // 如果点的是 header 内的按钮(如删除),不触发折叠 + if (e.target.closest('button')) return; + header.closest('.config-item').classList.toggle('collapsed'); + }); + // 加载配置 function loadConfig() { console.log('开始加载配置...'); diff --git a/plugins/addon/theme_configurator/template/admin/theme.css b/plugins/addon/theme_configurator/template/admin/theme.css index d4912c8..8e8778c 100644 --- a/plugins/addon/theme_configurator/template/admin/theme.css +++ b/plugins/addon/theme_configurator/template/admin/theme.css @@ -144,13 +144,18 @@ body { } .section-body { - padding: 0; + padding: 20px 24px; } /* 表单 */ .form-fields { display: grid; - gap: var(--spacing-lg); + grid-template-columns: 1fr 1fr; + gap: 16px 24px; +} + +.form-item--full { + grid-column: 1 / -1; } .form-item { @@ -312,6 +317,28 @@ textarea.form-control { padding: 16px; } +/* 折叠 */ +.config-item__header { + cursor: pointer; + user-select: none; +} + +.config-item__header h4::before { + content: '▼'; + display: inline-block; + margin-right: 6px; + font-size: 10px; + transition: transform 0.2s ease; +} + +.config-item.collapsed .config-item__header h4::before { + transform: rotate(-90deg); +} + +.config-item.collapsed .config-item__body { + display: none; +} + /* JSON编辑器 */ .json-editor { width: 100%; @@ -366,4 +393,12 @@ textarea.form-control { .tab-item { flex-shrink: 0; } + + .form-fields { + grid-template-columns: 1fr; + } + + .section-body { + padding: 16px; + } } \ No newline at end of file