Files
marqdo/examples/web-site/components/desk.mq.md
T
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- 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。
2026-11-18 10:29:26 +08:00

2.1 KiB
Executable File

markup, title, import
markup title import
occlusion Administration navigation and footer
component fs
ext/web/component/index.mq.md lib/fs.mq.md

The custom desk keeps its own brand and closing links, and omits the public side rail. Authentication remains the serving entry's responsibility. Neither constructing these nodes nor hiding their links can authorize a visitor to the administration route.

nav

返回 类型 说明
result list Desk navigation using the real current session

Construction needs no effects. The first link preserves Admin as the operator's current context, followed by Site, New and Logout. Only the logout link is conditional, matching the original navigation. The entire desk is separately gated, and the actual logout destination remains a native session route. Returned nodes keep their structured resource value so the parent can place them without HTML strings.

items =

@ label href when
1 Admin /admin
2 Site /
3 New /new
4 Logout /admin/logout auth

We resource = Describe the desk's current navigation. Return [Keep the same navigation fragment slot](component.resource(value=resource, slot="nav")).

foot

返回 类型 说明
result list Desk footer with terminal Markdown return and logout links

Read this leaf with fs.read under the site root. The route gate has already decided access before the renderer resolves this component. Site and Admin retain their return destinations, while Logout ends the session only when followed. The footer has one content responsibility and no internal layout to split further; the parent owns its placement and the original theme owns its appearance.

We text = Read the desk's terminal closing links and leaf = [Retain ordinary Markdown content](component.markdown(text=text, slot="footer-content")). Return [Place it in the semantic desk footer](component.wrap(children=leaf, kind="footer", slot="footer", style="foot")).