Decrease animations in login/signup

This commit is contained in:
Arthur Belleville 2025-10-30 21:44:16 +01:00
parent 4457d2594e
commit b855d7dbb9
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -43,11 +43,11 @@ export function LoginPage() {
const centerX = rect.width / 2;
const centerY = rect.height / 2;
const rotateX = ((y - centerY) / centerY) * -5; // Max 5 degrees tilt
const rotateY = ((x - centerX) / centerX) * 5;
const rotateX = ((y - centerY) / centerY) * -1; // Max 1 degree tilt
const rotateY = ((x - centerX) / centerX) * 1;
setTransform(
`perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.01, 1.01, 1.01)`
`perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.002, 1.002, 1.002)`
);
setIsHovered(true);
};
@ -112,8 +112,8 @@ export function LoginPage() {
className={twMerge(
"relative w-full h-full p-8 bg-card/80 backdrop-blur-md rounded-2xl border border-border z-10 transition-shadow duration-200",
isHovered
? "shadow-[0_20px_50px_rgba(0,0,0,0.3)] dark:shadow-[0_20px_50px_rgba(0,0,0,0.6)]"
: "shadow-2xl shadow-black/20 dark:shadow-black/40"
? "shadow-[0_15px_35px_rgba(0,0,0,0.15)] dark:shadow-[0_15px_35px_rgba(0,0,0,0.3)]"
: "shadow-xl shadow-black/10 dark:shadow-black/25"
)}
>
<div className="mb-6 flex items-center justify-between">

View file

@ -48,11 +48,11 @@ export function SignUpPage() {
const centerX = rect.width / 2;
const centerY = rect.height / 2;
const rotateX = ((y - centerY) / centerY) * -2; // Max 2 degrees tilt
const rotateY = ((x - centerX) / centerX) * 2;
const rotateX = ((y - centerY) / centerY) * -1; // Max 1 degree tilt
const rotateY = ((x - centerX) / centerX) * 1;
setTransform(
`perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.005, 1.005, 1.005)`
`perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.002, 1.002, 1.002)`
);
setIsHovered(true);
};
@ -164,8 +164,8 @@ export function SignUpPage() {
className={twMerge(
"relative w-full h-full p-6 bg-card/80 backdrop-blur-md rounded-2xl border border-border z-10 transition-shadow duration-200",
isHovered
? "shadow-[0_20px_50px_rgba(0,0,0,0.3)] dark:shadow-[0_20px_50px_rgba(0,0,0,0.6)]"
: "shadow-2xl shadow-black/20 dark:shadow-black/40"
? "shadow-[0_15px_35px_rgba(0,0,0,0.15)] dark:shadow-[0_15px_35px_rgba(0,0,0,0.3)]"
: "shadow-xl shadow-black/10 dark:shadow-black/25"
)}
>
<div className="mb-4 flex items-center justify-between">