docs: README补匿名门户主页章节(生成器/三档响应式/手机适配要点)

This commit is contained in:
yumoqing 2026-09-17 15:11:28 +08:00
parent 171839e308
commit ee7f553f0e

View File

@ -101,6 +101,13 @@ bash stop.sh # 停止服务
## 技术要点 ## 技术要点
### 匿名门户主页(index.ui 未登录分支)
- `wwwroot/index.ui` 由 `scripts/gen_home_index.py` 生成(幂等:自动保留 `{% if get_user() %}` 工作台分支,可重复重跑)。改主页版式改生成器后重跑,不要手改 index.ui。
- 样式全在 `wwwroot/home.css`(`.pl-` 前缀 / `--pl-` 变量,明暗双主题),header.tmpl 的 cssfiles() 自动收集。
- 响应式三档:>900 桌面单行 header;761-900 窄桌面(logo 缩字号+按钮 nowrap);≤760 手机两行 header(行1 logo+登录,行2 三锚点+主题+语言,靠 CSS order 重排)+ footer 竖排。
- 手机适配要点:bricks Text 渲染为 flex 容器且子项 min-width:auto 不收缩,logo 盒必须 `min-width:0` 才能 ellipsis;urlwidget 描述符上的 mobile_hidden 无效(urlwidget 只是取数包装,options 不传给内层控件)。
- 锚点导航(能力/产线/流程)用 scrollIntoView script bind;binds 必须在 widget 顶层(bricks 不读 options.binds)。
- **数据库名**:所有模块共用 `pipeline` 数据库(通过 `global_func.py` 映射) - **数据库名**:所有模块共用 `pipeline` 数据库(通过 `global_func.py` 映射)
- **sqlor API**:严格使用 `sor.C/U/D/R` 模式,`sor.U()` 只接受 2 个参数(id 在 data 字典中) - **sqlor API**:严格使用 `sor.C/U/D/R` 模式,`sor.U()` 只接受 2 个参数(id 在 data 字典中)
- **dspy 规范**:零 import、零 print、零 uuid,使用预加载全局函数 - **dspy 规范**:零 import、零 print、零 uuid,使用预加载全局函数