diff --git a/frontend/src/components/Auth/AuthModal.tsx b/frontend/src/components/Auth/AuthModal.tsx index 74023f9..e1826d3 100644 --- a/frontend/src/components/Auth/AuthModal.tsx +++ b/frontend/src/components/Auth/AuthModal.tsx @@ -54,7 +54,7 @@ const AuthModal: React.FC = ({ onClose }) => { {/*Container*/}
{/* Login/Register Buttons Container */}
@@ -80,16 +80,17 @@ const AuthModal: React.FC = ({ onClose }) => {
+
{/*Border Container*/}
= ({ onClose }) => { <> {authSwitch()} +
+ + ); }; diff --git a/frontend/src/components/Auth/LoginForm.tsx b/frontend/src/components/Auth/LoginForm.tsx index 8344472..cdd27a6 100644 --- a/frontend/src/components/Auth/LoginForm.tsx +++ b/frontend/src/components/Auth/LoginForm.tsx @@ -3,7 +3,7 @@ import Input from "../Layout/Input"; import Button, { ToggleButton } from "../Layout/Button"; import { useAuth } from "../../context/AuthContext"; import GoogleLogin from "./OAuth"; -import { CircleHelp as ForgotIcon} from "lucide-react"; +import { CircleHelp as ForgotIcon } from "lucide-react"; interface LoginFormData { username: string; @@ -101,52 +101,70 @@ const LoginForm: React.FC = ({ onSubmit, onForgotPassword }) => { return ( <> -
-

Login

-
- {errors.general && ( -

{errors.general}

- )} +
+

Login

+
- {errors.username && ( -

{errors.username}

- )} - + + {errors.general && ( +

{errors.general}

+ )} - {errors.password && ( -

{errors.password}

- )} - - + {errors.username && ( +

{errors.username}

+ )} + - - -
- + {errors.password && ( +

{errors.password}

+ )} + +
+ + + +
+ + +
+
+ + + +
+
+
); diff --git a/frontend/src/components/Auth/RegisterForm.tsx b/frontend/src/components/Auth/RegisterForm.tsx index 6bf6059..6e82be1 100644 --- a/frontend/src/components/Auth/RegisterForm.tsx +++ b/frontend/src/components/Auth/RegisterForm.tsx @@ -2,6 +2,7 @@ import React, { useState } from "react"; import Input from "../Layout/Input"; import Button from "../Layout/Button"; import { useAuth } from "../../context/AuthContext"; +import GoogleLogin from "./OAuth"; interface RegisterFormData { username: string; @@ -107,64 +108,88 @@ const RegisterForm: React.FC = ({ onSubmit }) => { }; return ( -
- {errors.general && ( -

{errors.general}

- )} + <> +
+
+

Register

+
- {errors.username && ( -

{errors.username}

- )} - + +
+ {errors.general && ( +

{errors.general}

+ )} - {errors.email && ( -

{errors.email}

- )} - + {errors.username && ( +

{errors.username}

+ )} + +
- {errors.password && ( -

{errors.password}

- )} - +
+ {errors.email && ( +

{errors.email}

+ )} + +
- {errors.confirmPassword && ( -

{errors.confirmPassword}

- )} - +
+ {errors.password && ( +

{errors.password}

+ )} + +
+
- - + {errors.confirmPassword && ( +

{errors.confirmPassword}

+ )} + +
+ + + +
+
+ +
+
+ +
+ + ); }; diff --git a/frontend/src/components/Layout/Input.tsx b/frontend/src/components/Layout/Input.tsx index 535fc45..ffc671d 100644 --- a/frontend/src/components/Layout/Input.tsx +++ b/frontend/src/components/Layout/Input.tsx @@ -2,6 +2,7 @@ import React from "react"; interface InputProps extends React.InputHTMLAttributes { extraClasses?: string; + children?: React.ReactNode; } const Input: React.FC = ({ @@ -10,19 +11,26 @@ const Input: React.FC = ({ placeholder = "", value = "", extraClasses = "", - onChange = () => {}, + onChange = () => { }, + children, ...props // all other HTML input props }) => { return ( - + <> +
+ + +
+ + ); }; diff --git a/frontend/src/components/Layout/Theme.tsx b/frontend/src/components/Layout/Theme.tsx index 3e457a7..06cdc69 100644 --- a/frontend/src/components/Layout/Theme.tsx +++ b/frontend/src/components/Layout/Theme.tsx @@ -20,7 +20,7 @@ const Theme: React.FC = () => { const nextIndex = (currentIndex + 1) % themes.length; const nextTheme = themes[nextIndex]; setTheme(nextTheme); - document.body.setAttribute("data-theme", nextTheme); // Update globally + document.body.setAttribute("data-theme", nextTheme); }; return ( diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 0b1fe65..caa31b8 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -21,6 +21,8 @@ export default { backgroundImage: { logo: "linear-gradient(45deg, #60A5FA, #8B5CF6, #EC4899, #FACC15,#60A5FA, #8B5CF6, #EC4899, #FACC15)", 'gradient-radial': 'radial-gradient(circle, var(--tw-gradient-stops))', + authForm: "linear-gradient(45deg, #1A0B33, #240046, #3C096C, #5A189A)", + authFormBorder: "linear-gradient(45deg, #3A0CA3, #7209B7, #B5179E, #F72585)", }, keyframes: { @@ -56,6 +58,10 @@ export default { '50%' : { opacity: '0.8'}, '100%' : { opacity: '1'}, }, + + fontSize: { + forgotPasswordResponsive: "clamp(0.3em, 3vw, 5em)", + } }, }, plugins: [