diff --git a/frontend/app/globals.css b/frontend/app/globals.css index f3d8a991..1a1cdf65 100644 --- a/frontend/app/globals.css +++ b/frontend/app/globals.css @@ -305,6 +305,17 @@ } } +/* ── Extreme temperature emphasis ── */ +.temp-extreme-hot { + color: #f97316; + text-shadow: 0 0 12px rgba(249, 115, 22, 0.35); +} + +.temp-extreme-cold { + color: #38bdf8; + text-shadow: 0 0 12px rgba(56, 189, 248, 0.35); +} + /* ══════════════════════════════════════════════════════════════ Map Marker Components (nearby stations, city bubbles) ══════════════════════════════════════════════════════════════ */ diff --git a/frontend/components/dashboard/PanelSections.tsx b/frontend/components/dashboard/PanelSections.tsx index c18b2bb7..c6b9b231 100644 --- a/frontend/components/dashboard/PanelSections.tsx +++ b/frontend/components/dashboard/PanelSections.tsx @@ -1,5 +1,13 @@ "use client"; +function getTempExtremeClass(temp: number | null | undefined, symbol?: string | null) { + if (temp == null || !Number.isFinite(temp)) return ""; + const isF = String(symbol || "").toUpperCase().includes("F"); + if (isF ? temp >= 104 : temp >= 40) return "temp-extreme-hot"; + if (isF ? temp <= 23 : temp <= -5) return "temp-extreme-cold"; + return ""; +} + import type { ChartConfiguration } from "chart.js"; import clsx from "clsx"; import { startTransition, useMemo } from "react"; @@ -65,7 +73,7 @@ export function HeroSummary() { {weatherIcon} {weatherText} -
+
{current.temp != null ? current.temp.toFixed(1) : "--"} diff --git a/frontend/components/dashboard/scan-terminal/AiCityTemperatureChart.tsx b/frontend/components/dashboard/scan-terminal/AiCityTemperatureChart.tsx index d20575ee..81d8424d 100644 --- a/frontend/components/dashboard/scan-terminal/AiCityTemperatureChart.tsx +++ b/frontend/components/dashboard/scan-terminal/AiCityTemperatureChart.tsx @@ -192,12 +192,12 @@ export function AiCityTemperatureChart({ detail }: { detail: CityDetail }) { grid: { color: "rgba(159, 178, 199, 0.08)" }, ticks: { callback: (_value, index) => - typeof index === "number" && index % 4 === 0 + typeof index === "number" && index % 3 === 0 ? chartData.times[index] : "", color: "#6B7A90", font: { size: 10 }, - maxTicksLimit: 6, + maxTicksLimit: 8, maxRotation: 0, }, },