重构城市决策卡 hero 布局:去除 sticky 固定效果,右侧改为三指标并列对比

将 scan-ai-city-hero 从"左重右轻"改为左右均衡布局,右侧从单一预计高温数字
替换为当前温度/预计最高温/峰值时间三列并排指标卡,中间列高亮为主指标。
移除冗余的 pills 行和隐藏的 mobile-priority div,新鲜度条改为水平单行。
同步更新亮色主题 CSS 新增 metrics 样式。修复 fallback 模块未使用变量。

Constraint: dark/light 双主题完整覆盖
Scope-risk: hero 高度缩减约 30%,需确认移动端 MobileDecisionCard 不受影响
This commit is contained in:
2569718930@qq.com
2026-05-06 17:57:40 +08:00
parent 227fe7906c
commit 2f73828d4d
5 changed files with 112 additions and 70 deletions
-10
View File
@@ -43,16 +43,6 @@ def _city_ai_model_cluster_note(ai_input: Dict[str, Any], *, locale: str) -> str
(_safe_float(item.get("value")) for item in sources if isinstance(item, dict) and "DEB" in str(item.get("model") or "")),
None,
)
non_deb_values = [
_safe_float(item.get("value"))
for item in sources
if isinstance(item, dict) and _safe_float(item.get("value")) is not None and "DEB" not in str(item.get("model") or "")
]
cluster_median = (
sorted(non_deb_values)[len(non_deb_values) // 2]
if non_deb_values
else (values[0] if values else None)
)
if locale == "en-US":
if count <= 0:
return f"No usable model cluster was returned; rely on {observation_label} only."