feat(web): C2 shell_css modes and page layout presets

Split injected shell CSS into vars/layout/widgets with full|minimal|off, add stacked/bare/rail layouts, and stop forcing has-sidebar when authors opt out.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-04 12:48:50 +08:00
1 parent b10a84466b
commit 155183eb30
10 files changed
+360 -43

No files matched your search

@@ -67,6 +67,6 @@
---
## 6. 过渡期 workaround
## 6. 过渡期 → 已落地
继续用更高特异性 + `!important`;实现后主题应删除这类补丁,并在回归里断言壳字符串不出现。
**C2 已落地(2026-09):** `shell_css=full|minimal|off`;页面/应用可设;`full` 含 `@media (max-width:720px)` 单列。金样 `tests/ext/web-c2-shell-layout.mq.md`。
@@ -62,6 +62,6 @@
---
## 6. 过渡期 workaround
## 6. 过渡期 → 已落地
`shell_css=off`(实现后)或强力覆盖 `body.has-sidebar`;条件导航暂用 CSS `display` + 双份链接,或轻量 `theme.js`。
**C2 已落地(2026-09):** `layout=sidebar|stacked|bare|rail`;有 side 时 `stacked`/`bare` 不再强制 `has-sidebar`。金样同上。
+1 -1
View File
@@ -2,7 +2,7 @@
| | |
|---|---|
| 状态 | **C0–C1 done · C2–C4 planned** |
| 状态 | **C0–C2 done · C3–C4 planned** |
| 日期 | 2026-09-04 |
| 问题盘点 | [../../research/ext-web-customization-limits.md](../../research/ext-web-customization-limits.md) |
| 相关 | [../ext-web.md](../ext-web.md) · [../ext-web-net.md](../ext-web-net.md) · [../../roadmap/ext-web.md](../../roadmap/ext-web.md) |
+1 -1
View File
@@ -43,7 +43,7 @@
|------|------|------|
| **C0** | `admin` 关则不占路径;`admin_prefix` / 登录回跳可配 | **done** |
| **C1** | gate 匹配与未登录策略一致;段边界默认 admin gate | **done** |
| **C2** | `shell_css` + `layout` 松绑 | **planned** |
| **C2** | `shell_css` + `layout` 松绑 | **done** |
| **C3** | 样式 strict / 脚本 defer·version | **planned** |
| **C4** | 壳预设收口与条件导航(后续) | **planned** |