|
| 1 | +// apps/codebility/app/home/_components/PageLoadingAnimation.tsx |
1 | 2 | "use client"; |
2 | 3 |
|
3 | 4 | import { motion } from "framer-motion"; |
@@ -80,8 +81,14 @@ export default function PageLoadingAnimation() { |
80 | 81 | }} |
81 | 82 | /> |
82 | 83 |
|
83 | | - {/* Main content container */} |
84 | | - <div className="relative z-10"> |
| 84 | + {/* |
| 85 | + FIX (CBP-131): Changed from `relative` to `relative flex flex-col items-center gap-8` |
| 86 | + so the polygon and the status group stack vertically and center naturally. |
| 87 | + Previously, the status group was `absolute` positioned relative to this div, |
| 88 | + which was only as wide as the hexagon (128px), causing the wider status content |
| 89 | + to overflow rightward ("lower-right drift"). |
| 90 | + */} |
| 91 | + <div className="relative z-10 flex flex-col items-center gap-8"> |
85 | 92 | {/* Hexagonal container */} |
86 | 93 | <motion.div |
87 | 94 | className="relative" |
@@ -203,7 +210,7 @@ export default function PageLoadingAnimation() { |
203 | 210 | </div> |
204 | 211 | </motion.div> |
205 | 212 |
|
206 | | - {/* Matrix-style code rain */} |
| 213 | + {/* Matrix-style code rain — kept as absolute so it doesn't affect flex layout */} |
207 | 214 | <div className="absolute -inset-20 pointer-events-none"> |
208 | 215 | {['01010', '11001', '10110', '00111'].map((code, i) => ( |
209 | 216 | <motion.div |
@@ -244,9 +251,14 @@ export default function PageLoadingAnimation() { |
244 | 251 | ))} |
245 | 252 | </div> |
246 | 253 |
|
247 | | - {/* Advanced loading text with typewriter effect */} |
| 254 | + {/* |
| 255 | + FIX (CBP-131): Removed `absolute -bottom-20 left-1/2 transform -translate-x-1/2`. |
| 256 | + Now a normal flex child — centers automatically under the polygon via the |
| 257 | + parent's `flex flex-col items-center`. `w-full max-w-xs sm:max-w-sm md:max-w-md` |
| 258 | + is preserved for responsive width capping. |
| 259 | + */} |
248 | 260 | <motion.div |
249 | | - className="absolute -bottom-20 left-1/2 transform -translate-x-1/2 w-full max-w-xs sm:max-w-sm md:max-w-md px-4" |
| 261 | + className="w-full max-w-xs sm:max-w-sm md:max-w-md px-4" |
250 | 262 | initial={{ opacity: 0, y: 20 }} |
251 | 263 | animate={{ opacity: 1, y: 0 }} |
252 | 264 | transition={{ delay: 1 }} |
|
0 commit comments