Add phone-only hub shell with four bottom tabs.
Keep desktop/tablet top nav unchanged; at max-width 720px use monitor/market/calculator/AI plus a More sheet for secondary pages. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4034,6 +4034,265 @@ body.login-page {
|
||||
}
|
||||
}
|
||||
|
||||
/* —— 手机壳:底栏四件套(仅 ≤720px;桌面/平板完全不进此规则) —— */
|
||||
.hub-mobile-tabbar,
|
||||
.hub-mobile-more {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
:root {
|
||||
--hub-m-tabbar-h: 56px;
|
||||
}
|
||||
|
||||
body.hub-phone .app-header .top-nav {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body.hub-phone .header-right {
|
||||
grid-template-columns: 1fr auto auto;
|
||||
grid-template-rows: auto;
|
||||
}
|
||||
|
||||
body.hub-phone .app-shell {
|
||||
padding-bottom: calc(var(--hub-m-tabbar-h) + max(10px, env(safe-area-inset-bottom)));
|
||||
}
|
||||
|
||||
body.hub-phone .page-head h1 {
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
body.hub-phone .page-head .head-tag {
|
||||
font-size: 0.62rem;
|
||||
}
|
||||
|
||||
/* 监控:工具条单列优先 */
|
||||
body.hub-phone #page-monitor .toolbar {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .toolbar .primary {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .toolbar .danger {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .toolbar .chk-label {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .toolbar .toolbar-spacer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .toolbar .toolbar-meta {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
body.hub-phone #page-monitor .host-status-panel {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* 行情:减噪,图表吃高度 */
|
||||
body.hub-phone #page-market .page-head {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
body.hub-phone #page-market .market-chart-wrap {
|
||||
min-height: min(52vh, 420px);
|
||||
}
|
||||
|
||||
body.hub-phone #page-market .market-ohlcv-title .market-day-split-opt {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* 计算器:卡片间距收紧 */
|
||||
body.hub-phone #page-calculator .calc-layout {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
body.hub-phone #page-calculator .calc-card {
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
body.hub-phone #page-calculator .calc-hint {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.hub-mobile-tabbar {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 80;
|
||||
height: calc(var(--hub-m-tabbar-h) + env(safe-area-inset-bottom));
|
||||
padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
|
||||
max(8px, env(safe-area-inset-left));
|
||||
align-items: stretch;
|
||||
justify-content: space-around;
|
||||
gap: 2px;
|
||||
background: color-mix(in srgb, var(--panel, #12161f) 92%, transparent);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hub-mobile-tabbar .hub-m-tab.nav-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hub-m-tab {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 6px 2px;
|
||||
padding: 0 4px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
color: var(--nav-link-idle, var(--muted));
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.hub-m-tab:hover,
|
||||
.hub-m-tab:focus-visible {
|
||||
color: var(--text);
|
||||
background: var(--nav-link-hover-bg, rgba(255, 255, 255, 0.04));
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.hub-m-tab.active {
|
||||
color: var(--accent, #6ea8ff);
|
||||
background: var(--accent-dim, rgba(110, 168, 255, 0.12));
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #6ea8ff) 35%, transparent);
|
||||
}
|
||||
|
||||
body.hub-phone #toast {
|
||||
bottom: calc(var(--hub-m-tabbar-h) + max(12px, env(safe-area-inset-bottom)));
|
||||
}
|
||||
|
||||
/* 更多抽屉 */
|
||||
body.hub-mobile-more-open .hub-mobile-more {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hub-mobile-more {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 90;
|
||||
}
|
||||
|
||||
.hub-mobile-more-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.hub-mobile-more-sheet {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
max-height: min(78vh, 560px);
|
||||
overflow: auto;
|
||||
padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
|
||||
border-radius: 16px 16px 0 0;
|
||||
background: var(--panel, #12161f);
|
||||
border: 1px solid var(--border-soft);
|
||||
border-bottom: none;
|
||||
box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.hub-mobile-more-handle {
|
||||
width: 36px;
|
||||
height: 4px;
|
||||
margin: 2px auto 12px;
|
||||
border-radius: 999px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.hub-mobile-more-title {
|
||||
margin: 0 0 4px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.hub-mobile-more-hint {
|
||||
margin: 0 0 14px;
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.hub-mobile-more-nav {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.hub-mobile-more-nav a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 44px;
|
||||
padding: 10px 8px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--nav-bg, rgba(255, 255, 255, 0.03));
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hub-mobile-more-nav a.nav-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hub-mobile-more-nav a.active {
|
||||
border-color: color-mix(in srgb, var(--accent, #6ea8ff) 45%, var(--border-soft));
|
||||
background: var(--accent-dim, rgba(110, 168, 255, 0.12));
|
||||
color: var(--accent, #6ea8ff);
|
||||
}
|
||||
|
||||
.hub-mobile-more-close {
|
||||
width: 100%;
|
||||
margin-top: 14px;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
/* AI 页为底栏让位;键盘打开时藏底栏 */
|
||||
body.hub-page-ai.hub-phone .app-shell {
|
||||
padding-bottom: calc(var(--hub-m-tabbar-h) + max(8px, env(safe-area-inset-bottom)));
|
||||
}
|
||||
|
||||
body.hub-page-ai.hub-phone.hub-ai-keyboard-open .hub-mobile-tabbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.hub-page-ai.hub-phone.hub-ai-keyboard-open .app-shell {
|
||||
padding-bottom: max(8px, env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
body.hub-page-ai.hub-phone .app-header .top-nav {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
body {
|
||||
font-size: 12px;
|
||||
|
||||
Reference in New Issue
Block a user