feat(web): 官网移动端适配

- 导航栏:≤768 隐藏横向链接,显示汉堡按钮;点击展开下拉菜单,含全部链接和 CTA
- 新增 ≤600 手机断点:footer 单列、grid 单列、container 内边距收窄、标题字号下调
- 首页:≤768 隐藏 Hero mock 预览(装饰性),≤600 CTA 按钮纵向排列
- features 页(库存/审批):hamburger 导航、≤768 隐藏 composite 视觉、≤600 footer 单列
- 文档页(docs.css):≤600 表格横向可滚
- 下载页:≤600 平台卡片单列排列

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-07 20:22:00 +08:00
parent ced407ea87
commit 0c96d5e325
8 changed files with 242 additions and 10 deletions
+48
View File
@@ -128,6 +128,41 @@ button { font-family: inherit; cursor: pointer; }
.nav-dropdown-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.nav-dropdown .logout { color: var(--danger-600); }
/* Hamburger button (hidden on desktop) */
.nav-hamburger {
display: none; flex-direction: column; justify-content: center; gap: 5px;
width: 40px; height: 40px; padding: 8px;
background: none; border: none; cursor: pointer;
border-radius: var(--radius-md);
}
.nav-hamburger span {
display: block; height: 2px; width: 22px;
background: var(--gray-700); border-radius: 2px;
transition: transform 0.2s, opacity 0.2s;
}
/* Mobile menu (hidden by default) */
.nav-mobile-menu {
display: none; flex-direction: column;
background: var(--gray-0);
border-top: 1px solid var(--border-subtle);
padding: 8px 0 16px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
padding: 12px 24px; font-size: var(--text-md);
color: var(--gray-700); font-weight: 500;
transition: background var(--duration-fast) var(--ease-standard);
}
.nav-mobile-menu a:hover { background: var(--gray-50); color: var(--brand-900); }
.nav-mobile-cta {
display: flex; flex-direction: column; gap: 8px;
padding: 12px 24px 0;
border-top: 1px solid var(--border-subtle);
margin-top: 8px;
}
.nav-mobile-cta .btn { justify-content: center; }
/* -- Footer -- */
footer {
background: var(--gray-25);
@@ -456,4 +491,17 @@ footer {
}
@media (max-width: 768px) {
.grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
/* Show hamburger, hide desktop nav links */
.nav-hamburger { display: flex; }
.topnav-links, .topnav-cta { display: none; }
}
@media (max-width: 600px) {
.topnav-inner { padding: 0 16px; }
.footer-grid { grid-template-columns: 1fr; gap: 32px; }
.footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
.grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
.container { padding: 0 16px; }
.section { padding-top: 48px; padding-bottom: 48px; }
h1, .h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
h2, .h2 { font-size: clamp(1.375rem, 5vw, 2rem); }
}