diff --git a/backend/render.py b/backend/render.py index c5dfd0f..9558013 100644 --- a/backend/render.py +++ b/backend/render.py @@ -14,7 +14,7 @@ from playwright.async_api import async_playwright from config import config from fonts import font_face_css -from integrations import claude_usage, codex, homeassistant, kobo, nas, trackers, weather +from integrations import claude_usage, codex, kobo, nas, trackers, weather TEMPLATES = Path(__file__).parent / "templates" @@ -55,10 +55,9 @@ def _gauges(usage: claude_usage.ClaudeUsage) -> list[dict]: async def build_context() -> dict: """Récupère toutes les sources en parallèle et assemble le contexte du template.""" - usage, wx, ha, nas_status, codex_status, tracker_stats = await asyncio.gather( + usage, wx, nas_status, codex_status, tracker_stats = await asyncio.gather( claude_usage.fetch_usage(), weather.fetch_weather(), - homeassistant.fetch_states(), nas.fetch_status(), codex.fetch_status(), trackers.fetch_all(), @@ -75,7 +74,6 @@ async def build_context() -> dict: "weather": wx, "claude": usage, "gauges": _gauges(usage), - "ha_states": ha, "nas": nas_status, "codex": codex_status, "trackers": tracker_stats, diff --git a/backend/templates/dashboard.html b/backend/templates/dashboard.html index 2e82a40..86bc720 100644 --- a/backend/templates/dashboard.html +++ b/backend/templates/dashboard.html @@ -28,11 +28,11 @@ padding: 46px 52px 0; display: grid; grid-template-columns: 560px 1fr; - grid-template-rows: 1fr auto; + grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "left right" "foot foot"; column-gap: 52px; } - .pane { grid-area: left; display: flex; flex-direction: column; min-width: 0; } + .pane { grid-area: left; display: flex; flex-direction: column; min-width: 0; overflow: hidden; } .deck { grid-area: right; display: flex; flex-direction: column; min-width: 0; padding-left: 52px; border-left: 4px solid var(--ink); } @@ -45,6 +45,7 @@ .label .alarm { background: var(--ink); color: var(--paper); } hr.div { border: 0; border-top: 4px solid var(--ink); margin: 22px 0; } + .pane hr.div { margin: 16px 0; } /* ---- Météo : silhouette 1-bit + relevé mono ---- */ .wx { display: flex; align-items: center; gap: 30px; } @@ -66,12 +67,13 @@ .ko { display: inline-block; padding: 0 8px; background: var(--ink); color: var(--paper); } /* ---- Trackers (ratio + envoi/réception du compte, sous le NAS) ---- */ - .trk { padding: 8px 0; border-bottom: 2px solid var(--ink); } + .trk { padding: 10px 0; border-bottom: 2px solid var(--ink); } .trk:last-child { border-bottom: 0; } .trk .top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; } - .trk .name { font-weight: 700; font-size: 28px; } - .trk .ratio { font-size: 38px; font-weight: 800; line-height: .9; } - .trk .io { font-size: 22px; font-weight: 500; line-height: 1.25; margin-top: 2px; } + .trk .name { font-weight: 700; font-size: 29px; } + .trk .ratio { font-size: 40px; font-weight: 800; line-height: .9; } + .trk .io { font-size: 22px; font-weight: 500; line-height: 1.2; margin-top: 3px; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* ============================ JAUGE (signature) ============================ Barre de progression intuitive : le noir se REMPLIT de gauche à droite avec la @@ -215,23 +217,12 @@ {% if t.ok %}{{ t.ratio_h }} {% else %}{{ t.error }}{% endif %} - {% if t.ok %}{% if t.has_io %}