Skip to content

Commit fafe998

Browse files
committed
#514 done
1 parent 6c6bc3e commit fafe998

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

src/pages/Login/Login.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, ChangeEvent, FormEvent, useContext } from "react";
22
import axios from "axios";
33
import { useNavigate, Link } from "react-router-dom";
4+
import { motion } from "framer-motion";
45
import { ThemeContext } from "../../context/ThemeContext";
56
import type { ThemeContextType } from "../../context/ThemeContext";
67

@@ -65,7 +66,12 @@ const Login: React.FC = () => {
6566

6667
<div className="relative w-full max-w-md px-4 sm:px-6">
6768
{/* Branding */}
68-
<div className="text-center mb-10">
69+
<motion.div
70+
initial={{ opacity: 0, y: -20 }}
71+
animate={{ opacity: 1, y: 0 }}
72+
transition={{ duration: 0.6 }}
73+
className="text-center mb-10"
74+
>
6975
<div className="inline-flex items-center justify-center w-20 h-20 bg-white rounded-3xl mb-6 shadow-2xl transform hover:scale-105 transition-transform duration-300 overflow-hidden">
7076
<img src="/crl-icon.png" alt="Logo" className="w-14 h-14 object-contain" />
7177
</div>
@@ -80,10 +86,15 @@ const Login: React.FC = () => {
8086
<p className={`${mode === "dark" ? "text-slate-300" : "text-gray-700"} text-lg font-medium`}>
8187
Track your GitHub journey
8288
</p>
83-
</div>
89+
</motion.div>
8490

8591
{/* Form Card */}
86-
<div className={`rounded-3xl p-6 sm:p-10 shadow-2xl border ${mode === "dark" ? "bg-white/10 backdrop-blur-xl border-white/20 text-white" : "bg-white border-gray-200 text-black"}`}>
92+
<motion.div
93+
initial={{ opacity: 0, y: 30 }}
94+
animate={{ opacity: 1, y: 0 }}
95+
transition={{ duration: 0.6, delay: 0.2 }}
96+
className={`rounded-3xl p-6 sm:p-10 shadow-2xl border ${mode === "dark" ? "bg-white/10 backdrop-blur-xl border-white/20 text-white" : "bg-white border-gray-200 text-black"}`}
97+
>
8798
<h2 className={`text-2xl font-bold text-center mb-8 ${mode === "dark" ? "text-white" : "text-gray-800"}`}>
8899
Welcome Back
89100
</h2>
@@ -155,10 +166,10 @@ const Login: React.FC = () => {
155166
</Link>
156167
</p>
157168
</div>
158-
</div>
169+
</motion.div>
159170
</div>
160171

161-
<div className={`${mode === "dark" ? "from-slate-900" : "from-slate-100"} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent`} />
172+
<div className={`${mode === "dark" ? "from-slate-900" : "from-slate-100"} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent pointer-events-none`} />
162173
</div>
163174
);
164175
};

src/pages/Signup/Signup.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,11 @@ const SignUp: React.FC = () => {
221221

222222
<div className="text-center mt-8">
223223
<p className={mode === "dark" ? "text-gray-300" : "text-gray-600"}>
224-
Already have an account?{" "}
225-
<Link to="/login" className={`font-medium hover:underline transition-colors duration-300 ${mode === "dark" ? "text-white" : "text-black"}`}>
224+
Already have an account?
225+
<Link
226+
to="/login"
227+
className="ml-1 text-purple-400 hover:text-purple-300 transition-colors duration-300"
228+
>
226229
Sign in here
227230
</Link>
228231
</p>
@@ -233,7 +236,7 @@ const SignUp: React.FC = () => {
233236
<div
234237
className={`${
235238
mode === "dark" ? "from-slate-900" : "from-slate-100"
236-
} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent`}
239+
} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent pointer-events-none`}
237240
/>
238241
</div>
239242
);

0 commit comments

Comments
 (0)