Commit 315e3fc
authored
fix(promo-bar): keep the deadline visible on mobile, and count down (#15)
On narrow screens the bar hid `.promo-bar-meta` along with the long sell,
so a phone saw "20% off with ALPHA_20 · See the recorder" and no reason to
act now. The deadline is the urgency; it is the last thing that should go.
- The deadline never hides at any width. Only the long sales line drops
under 900px.
- It sharpens in the final week: "ends Aug 15" becomes "6 days left",
"1 day left", then "last day", and turns emerald once inside 7 days.
- Weight bumped and colour moved from muted to secondary so it reads as a
deadline rather than as metadata.
- Small-screen row can wrap without the close button drifting.
Also corrects a bogus gap entry. The "horizontal overflow at 390px" logged
earlier was a measurement artefact: headless Chrome/Brave on macOS clamps
its window to a ~500px minimum layout width while still writing the PNG at
the requested width, so a 390px screenshot is a 500px layout cropped to
390px. Instrumented the real page instead - clientWidth and scrollWidth
both 500, no element over the viewport. Verifying below 500px needs CDP
device-metrics emulation, not --window-size.
Verified: clean production build; bar renders code + deadline + CTA + close
on one line at 500px with nothing clipped; countdown path confirmed by
temporarily setting `until` three days out ("3 days left", emerald).1 parent 24a44bc commit 315e3fc
3 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | | - | |
| 175 | + | |
171 | 176 | | |
172 | 177 | | |
173 | | - | |
| 178 | + | |
174 | 179 | | |
| 180 | + | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| 184 | + | |
178 | 185 | | |
| 186 | + | |
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
0 commit comments