sync update from LAN repo (source master @ ca48c4ec)
This commit is contained in:
1 parent
8bc8b0e082
commit
ea9dcff9c0
873 files changed
+107866
-14011
No files matched your search
+49
@@ -0,0 +1,49 @@
|
||||
# TikTok 页面 JSON 契约
|
||||
|
||||
源文件必须是 JSON 对象,并包含以下六个顶层模块。字段可增加,但不能删除顶层模块。
|
||||
|
||||
## `site`
|
||||
|
||||
- `brand`、`pageTitle`、`description`、`feedTitle`、`searchPlaceholder`、`uploadLabel`:非空字符串。
|
||||
- `currentUser`:当前登录账号,包含 `name`、`handle`、`initial`、`colors`(两个 `#RRGGBB`)和非负 `notifications`。
|
||||
|
||||
## `navigation`
|
||||
|
||||
- `primary`:桌面侧栏导航,最多 10 项;每项 `{label, icon, href}`。
|
||||
- `channels`:1–5 个频道标签字符串,推荐顺序为关注、推荐、同城。
|
||||
- `mobile`:移动端导航,最多 7 项;每项 `{label, icon}`,创作按钮可使用 `icon: "i-plus"`。
|
||||
- `footer`:侧栏页脚文字。
|
||||
- `href` 只使用页面内锚点,例如 `#videoFeed`、`#discover`。
|
||||
|
||||
可用图标:`i-home`、`i-compass`、`i-users`、`i-live`、`i-user`、`i-message`、`i-plus`。
|
||||
|
||||
## `videos`
|
||||
|
||||
- `items`:1–20 条,`id` 必须唯一。
|
||||
- 核心字段:`id`、`author`、`handle`、`initial`、`colors`、`text`、`tags`、`music`、`visual`、`ariaLabel`。
|
||||
- `visual` 仅为 `neon-city`、`coffee`、`mountain`。
|
||||
- 可选 `media` 会替换内置 `visual`:图片 `{type:"image", mediaUrl, alt?, pageUrl?}`;视频 `{type:"video", mediaUrl, posterUrl?, alt?, pageUrl?}`;网页 `{type:"webpage", pageUrl, title, description?, mediaUrl?, embed?}`。URL 只接受 `http(s)`;图片和视频也允许对应的 `data:` URL。
|
||||
- `metrics`:`{likes, comments, saves}`,均为非负数字。
|
||||
|
||||
## `sidebar`
|
||||
|
||||
- `loginPrompt`、`loginLabel`、`title`:非空字符串。
|
||||
- `recommendations`:0–20 项,每项 `{name, handle, initial, colors}`。
|
||||
|
||||
## `comments`
|
||||
|
||||
- `titleSuffix`、`inputPlaceholder`:非空字符串。
|
||||
- `items`:0–30 项,每项包含 `id`、`name`、`initial`、`colors`、`text`、`time`、非负 `likes`。
|
||||
|
||||
## `share`
|
||||
|
||||
- `title`:非空字符串。
|
||||
- `options`:1–8 项,每项 `{label, icon, toast, action}`。
|
||||
- `action` 只使用 `copy-link` 或 `notice`。
|
||||
- 可用图标:`i-link`、`i-message`、`i-code`、`i-flag`。
|
||||
|
||||
## 示例边界
|
||||
|
||||
- `assets/default-data.json` 只提供结构和演示内容,不是事实来源。
|
||||
- 所有颜色使用完整六位十六进制;无效颜色由模板回退。
|
||||
- JSON 使用双引号,不允许注释、Markdown 围栏或尾逗号。
|
||||
Reference in new issue
Block a user