Add desktop calculator tabs.
Show one strategy calculator at a time while preserving the existing mobile tab experience. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9359,6 +9359,64 @@ body.funds-fullscreen-open {
|
||||
}
|
||||
}
|
||||
|
||||
/* 电脑端计算器改为单页 Tab;手机继续使用原有紧凑 Tab 样式 */
|
||||
.calc-tab-label-desktop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-mobile-tabs {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
max-width: 640px;
|
||||
margin: 0 auto 14px;
|
||||
padding: 5px;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 12px;
|
||||
background: var(--nav-bg);
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-m-tab {
|
||||
min-height: 42px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 9px;
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-m-tab:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--border-soft);
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-m-tab.is-active {
|
||||
color: var(--accent);
|
||||
border-color: color-mix(in srgb, var(--accent) 45%, var(--border-soft));
|
||||
background: var(--accent-dim);
|
||||
box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent) 8%, transparent);
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-tab-label-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-tab-label-desktop {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-layout {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
body:not(.hub-phone) #page-calculator .calc-layout[data-calc-tab="trend"] [data-calc-pane="roll"],
|
||||
body:not(.hub-phone) #page-calculator .calc-layout[data-calc-tab="roll"] [data-calc-pane="trend"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* --- 策略说明 --- */
|
||||
.strategy-page-head {
|
||||
display: flex;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
|
||||
<noscript><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" /></noscript>
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260716-hub-stats-fold" />
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260716-calc-desktop-tabs" />
|
||||
<link rel="stylesheet" href="/assets/trade_stats_calendar.css?v=4" />
|
||||
<link rel="stylesheet" href="/assets/account_risk_badge.css?v=4" />
|
||||
<script src="/assets/account_risk_badge.js?v=4"></script>
|
||||
@@ -747,8 +747,12 @@
|
||||
<span id="calc-refresh-status" class="toolbar-meta"></span>
|
||||
</div>
|
||||
<div class="calc-mobile-tabs" role="tablist" aria-label="计算器切换">
|
||||
<button type="button" class="calc-m-tab is-active" data-calc-tab="trend" role="tab" aria-selected="true">趋势回调</button>
|
||||
<button type="button" class="calc-m-tab" data-calc-tab="roll" role="tab" aria-selected="false">滚仓</button>
|
||||
<button type="button" class="calc-m-tab is-active" data-calc-tab="trend" role="tab" aria-selected="true">
|
||||
<span class="calc-tab-label-mobile">趋势回调</span><span class="calc-tab-label-desktop">趋势回调计算器</span>
|
||||
</button>
|
||||
<button type="button" class="calc-m-tab" data-calc-tab="roll" role="tab" aria-selected="false">
|
||||
<span class="calc-tab-label-mobile">滚仓</span><span class="calc-tab-label-desktop">滚仓计算器</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="calc-layout" data-calc-tab="trend">
|
||||
<section class="calc-card card" data-calc-pane="trend">
|
||||
|
||||
Reference in New Issue
Block a user