Repository navigation
refactor: 重构站点导航与首页信息架构 - #19
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b65dfa5a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| .VPNavScreen { | ||
| display: block !important; |
There was a problem hiding this comment.
Show the tablet navigation screen only when open
At viewport widths from 768px through 959px, this unconditional !important rule overrides VitePress's closed-state display: none, so the fixed .VPNavScreen overlay remains visible even before the hamburger is opened and obscures the page. Restrict this override to the screen's open state (for example, .VPNavScreen.open) so tablet users can access the underlying content.
Useful? React with 👍 / 👎.
背景
站点原顶部导航将首页、新生、学习、竞赛、学院、课程、资料、党建、办事、校园、贡献、FAQ、赞助等约 14 个入口平铺展示,逐渐出现以下问题:
本 PR 将导航从“按原栏目平铺”调整为“按学生任务分组”,在不迁移内容、不修改现有 URL 的前提下,减少一级入口并增强首页总览能力。
信息架构
所有现有顶级栏目归入以下六类:
命名与入口说明:
/party/;实现内容
1. 统一分类数据源
新增
docs/.vitepress/site-map.ts,集中维护:顶部导航和首页分类卡片共用同一份数据,后续新增或调整栏目时无需维护两套配置。
2. 重构顶部导航
activeMatch覆盖每组下属的全部现有路由;3. 精简首页并提供全站导览
4. 修正仓库链接
首页仓库链接和页面底部“在 GitHub 上编辑此页”链接统一指向:
CWNU-Open-Source-Community/SCSWiki响应式行为
>= 1200px960–1199px768–959px361–640px<= 360px明暗主题、键盘焦点样式和
prefers-reduced-motion行为保持兼容。兼容性与变更边界
本次只调整导航组织方式和首页呈现:
因此可作为纯界面与信息架构调整发布。
验证结果
验证环境:Node.js 24.19.0、pnpm 9.15.4。
完整运行:
结果:
人工浏览器检查:
PR 创建前已通过本地实时预览向需求方展示桌面端和移动端效果,需求方验收后明确要求提交本 PR。
风险与后续注意事项
site-map.ts中合适的分类,避免重新增加大量一级导航项;/party/页面,后续增加团务内容时可在该栏目内扩展;回滚方式
本次没有内容迁移、数据变更或 URL 变更。如需回滚,直接回退本 PR 即可,无需执行数据恢复或链接迁移。