diff --git a/Energy_Pie/module.html b/Energy_Pie/module.html index 6397d9b..d399aaf 100644 --- a/Energy_Pie/module.html +++ b/Energy_Pie/module.html @@ -92,6 +92,22 @@ letter-spacing: 0.3px; opacity: 1; } + #hint .kv { + display: inline-block; + margin-right: 14px; + white-space: nowrap; + } + #hint .kv b { + font-weight: 800; + } + + /* App/kleine Breite: untereinander */ + @media (max-width: 720px) { + #hint .kv { + display: block; + margin: 4px 0; + } + } @@ -202,60 +218,55 @@ function donutCard({ title, percent, subtitle, color }) { const dash = share * c; // farbiger Anteil const rest = c - dash; // Rest (dunkel) - return ` -
+return ` +
-
- ${escapeHtml(title)} -
+
+ ${escapeHtml(title)} +
-
- +
+ - - + + - - - + + + -
- ${escapeHtml(percent.toFixed(1))}% -
-
- -
- ${escapeHtml(subtitle)} +
+ ${escapeHtml(percent.toFixed(1))}%
- `; + +
+ ${escapeHtml(subtitle)} +
+
+`; } function render(data) { @@ -289,8 +300,12 @@ function donutCard({ title, percent, subtitle, color }) { if (data?.hasData === false) { elHint.textContent = 'Keine Logdaten für den gewählten Zeitraum.'; } else { - elHint.textContent = - `Produktion: ${prod.toFixed(2)} kWh · Verbrauch: ${cons.toFixed(2)} kWh · Netzbezug: ${grid.toFixed(2)} kWh · Eigenverbrauch: ${eigenClamped.toFixed(2)} kWh`; + elHint.innerHTML = ` + Produktion: ${escapeHtml(prod.toFixed(2))} kWh + Verbrauch: ${escapeHtml(cons.toFixed(2))} kWh + Netzbezug: ${escapeHtml(grid.toFixed(2))} kWh + Eigenverbrauch: ${escapeHtml(eigenClamped.toFixed(2))} kWh + `; } elGrid.innerHTML = [