Align header title and ETH/BTC quotes with crypto_okx.

Match fullwidth title separator, page spacing, and move live tickers into the nav right column using the same spot-ticker UI/API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 19:27:33 +08:00
parent 22de1fd40c
commit 1d71414c56
13 changed files with 511 additions and 286 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ def pwa_app_name(exchange_key: str) -> str:
ex = (exchange_key or "").strip().lower()
return {
"binance": "Binance 交易系统",
"okx": "加密货币 | OKX 对冲",
"okx": "加密货币|OKX 对冲",
"gate": "Gate 交易系统",
}.get(ex, "交易系统")
+6 -3
View File
@@ -7,8 +7,8 @@
<script src="/static/autofill_guard.js?v=1"></script>
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
<link rel="stylesheet" href="/static/instance_page.css?v=13">
<link rel="stylesheet" href="/static/instance_theme.css?v=122">
<link rel="stylesheet" href="/static/instance_page.css?v=27">
<link rel="stylesheet" href="/static/instance_theme.css?v=123">
<script src="/static/account_risk_badge.js?v=4"></script>
<script src="/static/open_submit_gate.js?v=1"></script>
<meta name="theme-color" content="#0b0d14">
@@ -29,6 +29,7 @@
<div class="container">
{% include 'instance_brand_header.html' %}
<nav class="top-nav embed-top-nav" aria-label="实例导航">
<div class="top-nav-links">
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
<a href="/hedge-plan" data-embed-tab="hedge_plan" class="{% if initial_tab == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
{% endif %}
@@ -45,6 +46,8 @@
<a href="/env_config" data-embed-tab="env_config" class="{% if initial_tab == 'env_config' %}active{% endif %}">env配置</a>
{% endif %}
<a href="/settings" data-embed-tab="settings" class="{% if initial_tab == 'settings' %}active{% endif %}">系统设置</a>
</div>
{% include 'nav_spot_tickers.html' %}
</nav>
<div id="embed-flash" class="flash" style="display:none" role="status"></div>
@@ -138,6 +141,6 @@ window.__INSTANCE_DISPLAY__ = {{ display | tojson }};
<script src="/static/instance_live.js?v=6"></script>
<script src="/static/instance_embed.js?v=32"></script>
<script src="/static/instance_mobile_nav.js?v=3"></script>
<script src="/static/header_live_quotes.js?v=1"></script>
<script src="/static/nav_spot_tickers.js?v=1"></script>
</body>
</html>
+6 -3
View File
@@ -18,8 +18,8 @@
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
<link rel="manifest" href="/static/icons/manifest.webmanifest">
<title>{{ pwa_app_name }}</title>
<link rel="stylesheet" href="/static/instance_page.css?v=13">
<link rel="stylesheet" href="/static/instance_theme.css?v=122">
<link rel="stylesheet" href="/static/instance_page.css?v=27">
<link rel="stylesheet" href="/static/instance_theme.css?v=123">
</head>
<body
@@ -152,6 +152,7 @@
<div class="container">
{% include 'instance_brand_header.html' %}
<div class="top-nav">
<div class="top-nav-links">
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
<a href="/hedge-plan" class="{% if page == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
{% endif %}
@@ -168,6 +169,8 @@
<a href="/env_config" class="{% if page == 'env_config' %}active{% endif %}">env配置</a>
{% endif %}
<a href="/settings" class="{% if page == 'settings' %}active{% endif %}">系统设置</a>
</div>
{% include 'nav_spot_tickers.html' %}
</div>
{% with msg=get_flashed_messages() %}{% if msg %}<div class="flash">{{ msg[0] }}</div>{% endif %}{% endwith %}
@@ -2089,6 +2092,6 @@ document.addEventListener("DOMContentLoaded", function () {
{% endif %}
</script>
<script src="/static/instance_settings_prefs.js?v=22"></script>
<script src="/static/header_live_quotes.js?v=1"></script>
<script src="/static/nav_spot_tickers.js?v=1"></script>
</body>
</html>
@@ -1,24 +1,4 @@
{# 顶栏品牌标题 + 右上角 ETH/BTC 报价(与期权仓同款) #}
<div class="header header--brand">
<h1 class="brand-title">
<span class="brand-prefix">加密货币</span>
<span class="brand-sep" aria-hidden="true">|</span>
<span class="brand-product">OKX 对冲</span>
</h1>
<div class="header-live-quotes" id="header-live-quotes" aria-label="ETH/BTC 行情">
<div class="hlq-row" data-base="ETH">
<span class="hlq-icon hlq-icon--eth" aria-hidden="true"></span>
<span class="hlq-sym">ETHUSDT</span>
<span class="hlq-last" data-hlq="last">—</span>
<span class="hlq-chg" data-hlq="chg">—</span>
<span class="hlq-pct" data-hlq="pct">—</span>
</div>
<div class="hlq-row" data-base="BTC">
<span class="hlq-icon hlq-icon--btc" aria-hidden="true"></span>
<span class="hlq-sym">BTCUSDT</span>
<span class="hlq-last" data-hlq="last">—</span>
<span class="hlq-chg" data-hlq="chg">—</span>
<span class="hlq-pct" data-hlq="pct">—</span>
</div>
</div>
{# 顶栏品牌标题 — 与 crypto_okx 同款字体/间距(全角分隔符) #}
<div class="header">
<h1>加密货币|OKX 对冲</h1>
</div>
@@ -0,0 +1,19 @@
{# 导航右侧 BTC/ETH 报价(相对北京 08:00 开盘) — 与 crypto_okx 同款 #}
<div class="top-nav-spot-tickers" id="nav-spot-tickers" aria-label="BTC ETH 报价" title="涨跌相对北京时间 08:00 开盘(OKX sodUtc0)">
<div class="nav-spot-row" data-base="ETH">
<span class="nav-spot-ribbon" aria-hidden="true"></span>
<span class="nav-spot-icon nav-spot-icon--eth" aria-hidden="true">Ξ</span>
<span class="nav-spot-sym">ETHUSDT</span>
<span class="nav-spot-last" data-field="last">—</span>
<span class="nav-spot-chg" data-field="change">—</span>
<span class="nav-spot-pct" data-field="change_pct">—</span>
</div>
<div class="nav-spot-row" data-base="BTC">
<span class="nav-spot-ribbon" aria-hidden="true"></span>
<span class="nav-spot-icon nav-spot-icon--btc" aria-hidden="true">₿</span>
<span class="nav-spot-sym">BTCUSDT</span>
<span class="nav-spot-last" data-field="last">—</span>
<span class="nav-spot-chg" data-field="change">—</span>
<span class="nav-spot-pct" data-field="change_pct">—</span>
</div>
</div>