Make sleep fill a normal block
This commit is contained in:
+4
-15
@@ -1004,26 +1004,15 @@ body.page-dashboard .content {
|
|||||||
background: rgba(255, 255, 255, 0.08);
|
background: rgba(255, 255, 255, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sleep-phase-bar::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: 0 auto 0 0;
|
|
||||||
width: var(--sleep-actual-width, 0);
|
|
||||||
min-width: 0.2rem;
|
|
||||||
border-radius: inherit;
|
|
||||||
background: linear-gradient(135deg, rgba(90, 188, 242, 0.9), rgba(44, 126, 190, 0.9));
|
|
||||||
}
|
|
||||||
|
|
||||||
.sleep-phase-bar__fill {
|
.sleep-phase-bar__fill {
|
||||||
position: absolute;
|
display: block;
|
||||||
inset: 0 auto 0 0;
|
height: 100%;
|
||||||
width: var(--sleep-actual-width, 0);
|
min-width: 0.28rem;
|
||||||
min-width: 0.18rem;
|
max-width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
background: linear-gradient(135deg, rgba(90, 188, 242, 0.92), rgba(44, 126, 190, 0.92));
|
background: linear-gradient(135deg, rgba(90, 188, 242, 0.92), rgba(44, 126, 190, 0.92));
|
||||||
box-shadow: 0 10px 22px rgba(44, 126, 190, 0.22);
|
box-shadow: 0 10px 22px rgba(44, 126, 190, 0.22);
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sleep-phase-bar__target {
|
.sleep-phase-bar__target {
|
||||||
|
|||||||
@@ -221,8 +221,8 @@ $formatBalanceValue = static function (?array $entry) use ($settings): string {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($eventType === 'sleep' && $sleepActualTotal > 0): ?>
|
<?php if ($eventType === 'sleep' && $sleepActualTotal > 0): ?>
|
||||||
<div class="sleep-phase-bar" aria-label="Schlafdauer" style="--sleep-optimal-left: <?= e((string) $sleepOptimalPercent) ?>%; --sleep-actual-width: <?= e((string) $sleepActualPercent) ?>%">
|
<div class="sleep-phase-bar" aria-label="Schlafdauer" style="--sleep-optimal-left: <?= e((string) $sleepOptimalPercent) ?>%">
|
||||||
<span class="sleep-phase-bar__fill" aria-hidden="true"></span>
|
<span class="sleep-phase-bar__fill" style="width: <?= e((string) $sleepActualPercent) ?>%" aria-hidden="true"></span>
|
||||||
<span class="sleep-phase-bar__target"><span><?= e(format_duration_hours($optimalSleepHours)) ?></span></span>
|
<span class="sleep-phase-bar__target"><span><?= e(format_duration_hours($optimalSleepHours)) ?></span></span>
|
||||||
<?php if ($sleepPhaseRemainder > 0): ?>
|
<?php if ($sleepPhaseRemainder > 0): ?>
|
||||||
<span class="sleep-phase-bar__rest-label">noch <?= e(format_duration_hours($sleepPhaseRemainder)) ?> bis Skalenende</span>
|
<span class="sleep-phase-bar__rest-label">noch <?= e(format_duration_hours($sleepPhaseRemainder)) ?> bis Skalenende</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user