no message
This commit is contained in:
+93
-87
@@ -39,59 +39,67 @@
|
||||
@media (max-width: 720px) {
|
||||
#grid { grid-template-columns: 1fr !important; }
|
||||
}
|
||||
/* Quantum-Waves Hintergrund */
|
||||
/* Statischer "Fluid" Hintergrund in Donut-Farben */
|
||||
#wrap{
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
min-height:100vh;
|
||||
/* Grundton, damit es nicht "lochig" wirkt */
|
||||
background: rgba(18, 18, 22, 1);
|
||||
}
|
||||
#wrap::before{
|
||||
/* Nur EIN Layer, statisch */
|
||||
#wrap::before{
|
||||
content:"";
|
||||
position:absolute;
|
||||
inset:-50%;
|
||||
inset:-35%;
|
||||
background:
|
||||
radial-gradient(circle at 20% 25%, rgba(99,179,255,.20), transparent 45%),
|
||||
radial-gradient(circle at 80% 35%, rgba(168,85,247,.18), transparent 50%),
|
||||
radial-gradient(circle at 55% 80%, rgba(255,255,255,.07), transparent 55%);
|
||||
filter: blur(20px);
|
||||
opacity:.9;
|
||||
animation: qDrift 14s ease-in-out infinite alternate;
|
||||
radial-gradient(520px 420px at 18% 18%, rgba(99,179,255,0.42), transparent 60%),
|
||||
radial-gradient(560px 460px at 82% 28%, rgba(168,85,247,0.38), transparent 62%),
|
||||
radial-gradient(620px 520px at 55% 85%, rgba(99,179,255,0.26), transparent 64%),
|
||||
radial-gradient(700px 560px at 35% 70%, rgba(168,85,247,0.22), transparent 66%),
|
||||
radial-gradient(900px 700px at 50% 50%, rgba(255,255,255,0.06), transparent 70%);
|
||||
filter: blur(18px); /* weniger blur = mehr sichtbar */
|
||||
opacity: 1;
|
||||
pointer-events:none;
|
||||
z-index:0;
|
||||
}
|
||||
#wrap::after{
|
||||
content:"";
|
||||
position:absolute;
|
||||
inset:-30%;
|
||||
background:
|
||||
repeating-radial-gradient(circle at 30% 40%,
|
||||
rgba(255,255,255,.06) 0px,
|
||||
rgba(255,255,255,0) 14px,
|
||||
rgba(255,255,255,0) 28px),
|
||||
repeating-linear-gradient(120deg,
|
||||
rgba(168,85,247,.06) 0px,
|
||||
rgba(168,85,247,0) 18px,
|
||||
rgba(99,179,255,.05) 36px,
|
||||
rgba(99,179,255,0) 54px);
|
||||
mix-blend-mode: overlay;
|
||||
opacity:.35;
|
||||
animation: qWaves 10s linear infinite;
|
||||
pointer-events:none;
|
||||
z-index:0;
|
||||
}
|
||||
}
|
||||
/* Content über dem Background */
|
||||
#wrap > *{
|
||||
position:relative;
|
||||
z-index:1;
|
||||
}
|
||||
@keyframes qDrift{
|
||||
from{ transform: translate3d(-2%, -2%, 0) scale(1.02) rotate(-2deg); }
|
||||
to { transform: translate3d( 2%, 2%, 0) scale(1.08) rotate( 2deg); }
|
||||
}
|
||||
@keyframes qWaves{
|
||||
from{ transform: translate3d(0,0,0) rotate(0deg); }
|
||||
to { transform: translate3d(6%, -4%, 0) rotate(360deg); }
|
||||
}
|
||||
#period {
|
||||
font-size: 15px; /* größer */
|
||||
font-weight: 600; /* dicker */
|
||||
letter-spacing: 0.2px;
|
||||
opacity: 0.95;
|
||||
}
|
||||
/* Werte-Zeile (Produktion / Verbrauch / …) */
|
||||
#hint {
|
||||
margin-top: 6px;
|
||||
font-size: 15px; /* größer */
|
||||
font-weight: 700; /* noch etwas dicker */
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- 1) Puffer-Handler: fängt Symcon-Messages ab, selbst wenn UI noch nicht ready ist -->
|
||||
<script>
|
||||
window.__EnergyPieQueue = window.__EnergyPieQueue || [];
|
||||
@@ -177,54 +185,48 @@
|
||||
setTimeout(() => safeRequestAction('Refresh', 1), 150);
|
||||
}
|
||||
// --- donut card ---
|
||||
function donutCard({ title, percent, subtitle, color }) {
|
||||
const share = clamp01(percent / 100);
|
||||
const r = 56;
|
||||
const c = 2 * Math.PI * r;
|
||||
const dash = share * c;
|
||||
const gap = c - dash;
|
||||
return `
|
||||
<div style="border:1px solid rgba(255,255,255,0.12);
|
||||
border-radius:16px;
|
||||
padding:14px;
|
||||
min-height:260px;
|
||||
width:100%;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
gap:12px;
|
||||
background:rgba(0,0,0,0.08);
|
||||
backdrop-filter: blur(2px);">
|
||||
<div style="font-size:14px;font-weight:700;opacity:.9;">
|
||||
${escapeHtml(title)}
|
||||
</div>
|
||||
<div style="position:relative;width:180px;height:180px;">
|
||||
<svg width="180" height="180" viewBox="0 0 180 180">
|
||||
<circle cx="90" cy="90" r="${r}"
|
||||
fill="none"
|
||||
stroke="rgba(255,255,255,0.10)"
|
||||
stroke-width="18" />
|
||||
<circle cx="90" cy="90" r="${r}"
|
||||
fill="none"
|
||||
stroke="${color}"
|
||||
stroke-width="18"
|
||||
stroke-linecap="butt"
|
||||
stroke-dasharray="${dash} ${gap}"
|
||||
transform="rotate(-90 90 90)" />
|
||||
</svg>
|
||||
<div style="position:absolute;inset:0;display:flex;
|
||||
align-items:center;justify-content:center;
|
||||
font-weight:800;font-size:24px;">
|
||||
${escapeHtml(percent.toFixed(1))}%
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size:12px;opacity:.65;text-align:center;">
|
||||
${escapeHtml(subtitle)}
|
||||
</div>
|
||||
function donutCard({ title, percent, subtitle, color }) {
|
||||
const share = clamp01(percent / 100);
|
||||
const r = 56;
|
||||
const c = 2 * Math.PI * r;
|
||||
let dash = share * c;
|
||||
// Schutz gegen Rundungs-Artefakte bei 99.9..100%
|
||||
if (dash > c - 0.01) dash = c;
|
||||
return `
|
||||
<div style="padding:18px 10px;
|
||||
width:100%;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
gap:12px;">
|
||||
<div style="font-size:15px;font-weight:800;opacity:.95;">
|
||||
${escapeHtml(title)}
|
||||
</div>
|
||||
<div style="position:relative;width:180px;height:180px;">
|
||||
<svg width="180" height="180" viewBox="0 0 180 180">
|
||||
<!-- Anteilsegment -->
|
||||
<circle cx="90" cy="90" r="${r}"
|
||||
fill="none"
|
||||
stroke="${color}"
|
||||
stroke-width="18"
|
||||
stroke-linecap="butt"
|
||||
stroke-dasharray="${dash} ${c}"
|
||||
transform="rotate(-90 90 90)"
|
||||
style="filter: drop-shadow(0 0 12px ${color});" />
|
||||
</svg>
|
||||
<div style="position:absolute;inset:0;display:flex;
|
||||
align-items:center;justify-content:center;
|
||||
font-weight:900;font-size:26px;">
|
||||
${escapeHtml(percent.toFixed(1))}%
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
</div>
|
||||
<div style="font-size:13px;opacity:.75;text-align:center;">
|
||||
${escapeHtml(subtitle)}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
function render(data) {
|
||||
const values = data?.values || {};
|
||||
const prod = toNum(values?.Produktion);
|
||||
@@ -250,8 +252,12 @@
|
||||
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 = `
|
||||
<span class="kv"><b>Produktion:</b> ${escapeHtml(prod.toFixed(2))} kWh</span>
|
||||
<span class="kv"><b>Verbrauch:</b> ${escapeHtml(cons.toFixed(2))} kWh</span>
|
||||
<span class="kv"><b>Netzbezug:</b> ${escapeHtml(grid.toFixed(2))} kWh</span>
|
||||
<span class="kv"><b>Eigenverbrauch:</b> ${escapeHtml(eigenClamped.toFixed(2))} kWh</span>
|
||||
`;
|
||||
}
|
||||
elGrid.innerHTML = [
|
||||
donutCard({
|
||||
|
||||
Reference in New Issue
Block a user