Commit 66ea6e3
fix(docsite): stop mobile hero page-jump and polish the theme collage (#3401)
The home hero's theme reel re-skins the page on each swap. On mobile the card
collage sits in normal flow, so a theme with different fonts/spacing changed the
collage's height and reflowed the whole page every ~4.5s while autoplaying.
- Reserve a stable, theme-independent height for the collage so a theme swap
can't reflow the page, and move its top gap to a non-themed wrapper (page.tsx)
so --hero-gap/--spacing resolve in the docsite scale rather than the active
theme's.
- Drop the earlier --spacing-* force-cast on the collage so every theme renders
in its own authentic spacing again; the fixed height + bounded rows + flexible
image cells absorb the per-theme size differences.
- Keep auto-advance desktop-only; mobile stays manual (swipe + dots).
- 2-col: the product/reward cards grow to fill the row (side row is
content-sized) so the collage never leaves dead space.
- 3-col: size the row to fit the tallest theme's side column and distribute the
side items with space-between so it fills without spilling past the cards;
hoist the radio + badge pills into that distribution so their gap matches the
rest.
- Pin the collage layout gaps (16px) and inner padding (24px) to constants so
the column widths and gaps are identical across the 2-col/3-col breakpoints
and across themes.
- Round the collage images with --radius-container (was --radius-element) so
they match the card corners (most visible on Matcha: 18px vs 12px).
- Shorten the overly descriptive reel product names so the card titles fit on
one line in the narrow 2-col cards without truncating (e.g. "Iced matcha
latte" -> "Matcha", "Dried sea holly" -> "Sea holly", "Holo flip phone" ->
"Phone").
- Use one consistent label ("Points") for the reward/progress card across all
themes (was "Setup progress", "Loyalty perks", "Sparkle points", etc.).
- Apply the same shortened names in the /themes showcase preview so the hero and
the theme gallery stay consistent.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent c891bf8 commit 66ea6e3
5 files changed
Lines changed: 110 additions & 68 deletions
File tree
- apps/docsite/src
- app/(site)
- _landing/hero
- components
Lines changed: 59 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
82 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
88 | 103 | | |
89 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
90 | 107 | | |
91 | 108 | | |
92 | 109 | | |
93 | 110 | | |
94 | | - | |
95 | | - | |
| 111 | + | |
| 112 | + | |
96 | 113 | | |
97 | 114 | | |
98 | 115 | | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
102 | 119 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 120 | | |
109 | 121 | | |
110 | 122 | | |
| |||
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
123 | | - | |
124 | | - | |
| 135 | + | |
| 136 | + | |
125 | 137 | | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
129 | | - | |
130 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
131 | 144 | | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
135 | 151 | | |
136 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
137 | 156 | | |
138 | 157 | | |
139 | | - | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
143 | 169 | | |
144 | 170 | | |
145 | 171 | | |
| |||
150 | 176 | | |
151 | 177 | | |
152 | 178 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 179 | + | |
| 180 | + | |
156 | 181 | | |
157 | 182 | | |
158 | 183 | | |
159 | 184 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 185 | + | |
164 | 186 | | |
165 | | - | |
| 187 | + | |
166 | 188 | | |
167 | 189 | | |
168 | 190 | | |
| |||
181 | 203 | | |
182 | 204 | | |
183 | 205 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 206 | + | |
188 | 207 | | |
189 | 208 | | |
190 | 209 | | |
| |||
212 | 231 | | |
213 | 232 | | |
214 | 233 | | |
215 | | - | |
| 234 | + | |
216 | 235 | | |
217 | 236 | | |
218 | 237 | | |
| |||
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
290 | 313 | | |
291 | 314 | | |
292 | 315 | | |
| |||
300 | 323 | | |
301 | 324 | | |
302 | 325 | | |
303 | | - | |
| 326 | + | |
304 | 327 | | |
305 | 328 | | |
306 | 329 | | |
| |||
337 | 360 | | |
338 | 361 | | |
339 | 362 | | |
| 363 | + | |
340 | 364 | | |
341 | 365 | | |
342 | 366 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
286 | 295 | | |
287 | 296 | | |
288 | 297 | | |
289 | 298 | | |
290 | 299 | | |
291 | 300 | | |
292 | | - | |
| 301 | + | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| |||
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| |||
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| |||
0 commit comments