refactor: structure YMB as enterprise React app
This commit is contained in:
1 parent
e575ebd948
commit
eb3eb8dfc6
18 files changed
+182
-20
No files matched your search
@@ -4,6 +4,29 @@
|
||||
|
||||
YMB 公开站点 React + Vite 项目,参考 YouTube 的内容发现信息架构,支持桌面端与移动端。
|
||||
|
||||
## 企业级目录
|
||||
|
||||
```text
|
||||
src/
|
||||
├── app/ # 路由与全局 Store
|
||||
├── layouts/ # AppShell、顶部栏、侧栏、移动端导航
|
||||
├── pages/ # Home、Shorts、Subscriptions、Library、History、Search、Watch
|
||||
├── components/ # MediaCard、SectionHeading 等复用组件
|
||||
├── features/ # 后续业务域扩展入口
|
||||
├── services/ # 目录检索与接口边界
|
||||
├── data/ # 演示目录数据
|
||||
├── i18n/ # ID / EN / zh-CN 语言包
|
||||
└── lib/seo.js # 页面 SEO 元数据入口
|
||||
```
|
||||
|
||||
## YouTube 对照的信息架构
|
||||
|
||||
- 顶部 AppBar:品牌、全局搜索、语言、通知、用户入口。
|
||||
- 桌面侧栏:Home、Shorts、Subscriptions、Library、History、Liked videos。
|
||||
- 首页:Hero 推荐、Topic chips、视频网格、Shorts 横滑、频道推荐。
|
||||
- 观看页:16:9 播放器、标题/频道信息、Up next 推荐队列。
|
||||
- 移动端:抽屉侧栏、底部四项导航、两列视频卡与横滑 Shorts。
|
||||
|
||||
## 运行
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user