fix(docs): optimize docs layout and mobile navigation styles - #385
fix(docs): optimize docs layout and mobile navigation styles#385xuanlid wants to merge 3 commits into
Conversation
WalkthroughThe documentation theme updates the header and tab navigation for responsive layouts. It replaces fixed content height calculations with navigation variables and adds wide-screen content, aside, and sidebar layout rules. ChangesResponsive documentation layout
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/.vitepress/theme/components/CustomHeader.vue`:
- Around line 386-392: Update the existing max-width: 640px responsive rule in
CustomHeader.vue to set --header-inline-padding to 12px, and remove the direct
padding override on .header-top so both header sections share the same
responsive horizontal padding.
- Around line 412-416: Update the narrow-screen .header-top media-query layout
to use two grid columns when .search-section is hidden, removing the unused
middle column and its associated spacing. Ensure the logo column can shrink or
truncate so the remaining header tools stay within the viewport.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 498e12d8-00ea-442e-9ee1-8fad31f3b51f
📒 Files selected for processing (2)
docs/.vitepress/theme/components/CustomHeader.vuedocs/.vitepress/theme/style.css
📦 Package Previewpnpm add https://pkg.pr.new/@opentiny/tiny-robot@46e72ba pnpm add https://pkg.pr.new/@opentiny/tiny-robot-kit@46e72ba pnpm add https://pkg.pr.new/@opentiny/tiny-robot-svgs@46e72ba commit: 46e72ba |

背景
文档站在不同屏幕尺寸下存在布局体验问题:
修改内容
优化文档站顶部 Header 布局
--header-inline-padding,统一 Header 第一行和第二行导航的横向间距。优化文档页宽屏展示
修复移动端样式问题
max-width: 640px下收窄 Header 横向间距,改善 Samsung Galaxy S8+ 等窄屏设备下的挤压问题。影响范围
验证
git diff --check,无空白格式问题。Summary by CodeRabbit