- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
32 lines
1.5 KiB
Markdown
Executable File
32 lines
1.5 KiB
Markdown
Executable File
---
|
|
markup: occlusion
|
|
title: Session-aware sidebar component
|
|
import:
|
|
component: ext/web/component/index.mq.md
|
|
---
|
|
|
|
This module owns only the selected navigation responsibility. Its labels and destinations retain the original site order. The session-dependent rows are a typed navigation resource because their visibility must follow each request rather than a startup snapshot.
|
|
|
|
## side
|
|
|
|
| 返回 | 类型 | 说明 |
|
|
|---|---|---|
|
|
| result | list | One typed navigation resource with stable fragment identity |
|
|
|
|
Construction is pure and does not log in, log out or register a route. Empty when values keep links visible; guest and auth use the actual session supplied by the server. The resource renderer retains native navigation classes for the existing theme. Hiding Admin never protects its URL: the serving entry separately binds a real /admin role gate.
|
|
|
|
The parent places this region and owns its grid relationship. Edit labels here and update declared routes when changing a destination; do not concatenate an HTML navigation string or return an obsolete front/back binding table.
|
|
|
|
`items` =
|
|
|
|
| @ | label | href | when |
|
|
|---|---|---|---|
|
|
| 1 | 1. Home | / | |
|
|
| 2 | 2. New form | /new | |
|
|
| 3 | 3. Login | /login | guest |
|
|
| 4 | 3. Admin | /admin | auth |
|
|
| 5 | About | /about | |
|
|
|
|
We **resource = [Describe current-session navigation](component.navigation(items=`items`, region="sidebar"))**.
|
|
Return *[Keep this region as a typed View resource](component.resource(value=`resource`, slot="sidebar"))*.
|