Skip to content

Commit bc6bc69

Browse files
committed
Update Info.tsx
1 parent 22d82b8 commit bc6bc69

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/components/Info.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ const Info: React.FC = () => {
228228
{/* Card on Top Left */}
229229
{windowWidth >= 270 && (
230230
<motion.div
231-
className="absolute top-2 left-2 bg-black/60
231+
className="absolute top-2 left-3 bg-black/60
232232
backdrop-blur-sm rounded-lg sm:rounded-xl p-2.5 sm:p-4 md:p-6 shadow-lg
233-
max-w-[180px] sm:max-w-[220px] md:max-w-xs transform hover:scale-105
234-
transition-all duration-300 ease-out z-10 border border-white/50"
233+
max-w-[180px] sm:max-w-[220px] md:max-w-xs origin-center
234+
transition-all duration-300 ease-out z-10 border border-white/50 origin-center"
235235
whileHover={{ scale: 1.05 }}
236236
>
237237
{windowWidth >= 355 && (
@@ -257,24 +257,23 @@ const Info: React.FC = () => {
257257
{/* Card on Bottom Right */}
258258
{windowWidth >= 270 && (
259259
<motion.div
260-
className="absolute bottom-2 right-2 bg-black/60
260+
style={{ willChange: 'transform' }}
261+
whileHover={{ scale: 1.05 }}
262+
className="absolute bottom-2 right-3 bg-black/60
261263
backdrop-blur-sm rounded-lg sm:rounded-xl p-2.5 sm:p-4 md:p-6 shadow-lg
262-
max-w-[180px] sm:max-w-[220px] md:max-w-xs transform hover:scale-105
264+
max-w-[180px] sm:max-w-[220px] md:max-w-xs origin-center will-
263265
transition-all duration-300 ease-out z-10 border border-white/50"
264-
whileHover={{ scale: 1.05 }}
265266
>
266-
{windowWidth >= 355 && (
267+
{windowWidth >= 355 ? (
267268
<>
268269
<h3 className="text-base sm:text-lg font-bold mb-1 text-amber-100 font-AnonymousPro">
269270
Challenge and Fun: It's hard fun.
270271
</h3>
271272
<p className="text-white text-xs sm:text-sm leading-tight sm:leading-snug">
272-
Bringing interactive, meaningful experiences that make
273-
education exciting and impactful.
273+
Bringing interactive, meaningful experiences that make education exciting and impactful.
274274
</p>
275275
</>
276-
)}
277-
{windowWidth < 355 && windowWidth >= 270 && (
276+
) : (
278277
<h3 className="text-base sm:text-lg font-bold text-amber-100 font-AnonymousPro">
279278
Challenge and Fun: It's hard fun.
280279
</h3>

0 commit comments

Comments
 (0)