Bring back the big timer; the bar pill takes over on scroll

The big asleep/awake card returns below the frozen bar, and the bar
pill becomes its twin: both tick together, but the pill stays
visibility-hidden — slot reserved, so the bar never shifts — while the
card is on screen, appearing only once the card scrolls out of sight
(rAF-throttled scroll check against the bar's bottom edge).
This commit is contained in:
Alexander Heldt
2026-07-13 21:31:29 +00:00
parent 8981214e55
commit cdd701f0b4
4 changed files with 90 additions and 8 deletions
+9 -2
View File
@@ -78,8 +78,9 @@
<main>
<section class="day-bar">
<!-- Compact asleep/awake counter (the old big clock); hidden until a
sleep event exists. Hover/long-press shows "since" via title. -->
<!-- Compact twin of the big timer below: invisible (but keeping its
slot) while the big card is on screen, shown once it scrolls
away. Hidden entirely until a sleep event exists. -->
<div id="bar-clock" class="bar-clock" hidden>
<span id="bar-clock-icon" aria-hidden="true"></span>
<span id="bar-clock-time"></span>
@@ -90,6 +91,12 @@
<button type="button" id="day-today" class="ghost">Today</button>
</section>
<section id="big-clock" class="big-clock" hidden>
<div class="bc-label" id="bc-label"></div>
<div class="bc-time" id="bc-time">0:00</div>
<div class="bc-since" id="bc-since"></div>
</section>
<section class="quick-actions">
<h2>Log event</h2>
<div class="grid">