diff --git a/assets/css/app.css b/assets/css/app.css index fb141a3..7bfa793 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -1012,6 +1012,7 @@ body.page-dashboard .content { min-width: 0.18rem; overflow: hidden; border-radius: inherit; + background: linear-gradient(135deg, rgba(90, 188, 242, 0.9), rgba(44, 126, 190, 0.9)); box-shadow: 0 12px 28px rgba(6, 16, 28, 0.2); } @@ -1042,9 +1043,9 @@ body.page-dashboard .content { .sleep-phase-bar__segment { box-sizing: border-box; position: relative; - width: var(--sleep-segment-width, auto); + width: auto; height: 100%; - flex: 0 0 var(--sleep-segment-width, auto); + flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; diff --git a/templates/pages/dashboard.php b/templates/pages/dashboard.php index 796a4d6..230d2d1 100644 --- a/templates/pages/dashboard.php +++ b/templates/pages/dashboard.php @@ -116,7 +116,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string { - 0 ? rtrim(rtrim(number_format((float) $item['value'], 2, ',', '.'), '0'), ',') . ' ' . (string) $item['unit'] : ''; ?> + 0 ? ($eventType === 'sleep' ? format_duration_hours((float) $item['value']) : rtrim(rtrim(number_format((float) $item['value'], 2, ',', '.'), '0'), ',') . ' ' . (string) $item['unit']) : ''; ?> $isImportedWalkSport ? 'Spaziergang' : (string) ($sportType['label'] ?? 'Sport'), 'walk' => 'Spaziergang', @@ -221,13 +221,13 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string { 0): ?>
-
+
0): ?> ['Tief', 'deep'], 'rem' => ['REM', 'rem'], 'core' => ['Kern', 'core']] as $phase => [$label, $class]): ?> 0 ? max(0.5, min(100, ($phaseHours / $sleepActualTotal) * 100)) : 0; ?> - + @@ -235,7 +235,7 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string { 0): ?> 0 ? max(0.5, min(100, ($sleepUnclassified / $sleepActualTotal) * 100)) : 0; ?> - + Schlaf