mirror of
https://github.com/TurTaskProject/TurTaskWeb.git
synced 2025-12-20 06:24:07 +01:00
Refactor login and signup pages, add floating
particles component
This commit is contained in:
parent
24a04b8239
commit
d827f5b8a2
@ -8,14 +8,7 @@ export function FloatingParticles() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div style={{ width: "0%", height: "100vh" }}>
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
width: "100%",
|
|
||||||
height: "100vh",
|
|
||||||
zIndex: 0,
|
|
||||||
backgroundColor: "#EBF2FA",
|
|
||||||
}}>
|
|
||||||
<Particles
|
<Particles
|
||||||
id="particles"
|
id="particles"
|
||||||
init={particlesInit}
|
init={particlesInit}
|
||||||
|
|||||||
@ -65,8 +65,15 @@ export function LoginPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<NavPreLogin text="Don't have account?" btn_text="Sign Up" link="/signup" />
|
<NavPreLogin
|
||||||
<div className="flex flex-row bg-neutral-400">
|
text="Don't have account?"
|
||||||
|
btn_text="Sign Up"
|
||||||
|
link="/signup"
|
||||||
|
/>
|
||||||
|
<div className="h-screen flex items-center justify-center bg-gradient-to-r from-zinc-100 via-gray-200 to-zinc-100">
|
||||||
|
{/* Particles Container */}
|
||||||
|
|
||||||
|
<FloatingParticles />
|
||||||
{/* Login Box */}
|
{/* Login Box */}
|
||||||
<div className="flex items-center justify-center flex-1 z-50">
|
<div className="flex items-center justify-center flex-1 z-50">
|
||||||
<div className="w-100 bg-white border-solid rounded-lg p-8 shadow space-y-4">
|
<div className="w-100 bg-white border-solid rounded-lg p-8 shadow space-y-4">
|
||||||
@ -78,7 +85,8 @@ export function LoginPage() {
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
className="stroke-current shrink-0 h-6 w-6"
|
className="stroke-current shrink-0 h-6 w-6"
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24">
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
@ -122,20 +130,23 @@ export function LoginPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Login Button */}
|
{/* Login Button */}
|
||||||
<button className="btn bg-blue-700 hover:bg-blue-900 w-full text-white font-bold" onClick={handleSubmit}>
|
<button
|
||||||
|
className="btn bg-blue-700 hover:bg-blue-900 w-full text-white font-bold"
|
||||||
|
onClick={handleSubmit}
|
||||||
|
>
|
||||||
Login
|
Login
|
||||||
</button>
|
</button>
|
||||||
<div className="divider">OR</div>
|
<div className="divider">OR</div>
|
||||||
{/* Login with Google Button */}
|
{/* Login with Google Button */}
|
||||||
<button className="btn bg-gray-200 btn-outline w-full " onClick={() => googleLoginImplicit()}>
|
<button
|
||||||
|
className="btn bg-gray-200 btn-outline w-full "
|
||||||
|
onClick={() => googleLoginImplicit()}
|
||||||
|
>
|
||||||
<FcGoogle className="rounded-full bg-white" />
|
<FcGoogle className="rounded-full bg-white" />
|
||||||
Login with Google
|
Login with Google
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="basis-1/2 bg-#ebf2fa h-screen z-0">
|
|
||||||
<FloatingParticles />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { useGoogleLogin } from "@react-oauth/google";
|
|||||||
import { NavPreLogin } from "../navigations/NavPreLogin";
|
import { NavPreLogin } from "../navigations/NavPreLogin";
|
||||||
import { useAuth } from "src/hooks/AuthHooks";
|
import { useAuth } from "src/hooks/AuthHooks";
|
||||||
import { createUser, googleLogin } from "src/api/AuthenticationApi";
|
import { createUser, googleLogin } from "src/api/AuthenticationApi";
|
||||||
|
import { FloatingParticles } from "../FlaotingParticles";
|
||||||
|
|
||||||
export function SignUp() {
|
export function SignUp() {
|
||||||
const Navigate = useNavigate();
|
const Navigate = useNavigate();
|
||||||
@ -76,9 +77,13 @@ export function SignUp() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<NavPreLogin text="Already have an account?" btn_text="Log In" link="/login" />
|
<NavPreLogin
|
||||||
|
text="Already have an account?"
|
||||||
|
btn_text="Log In"
|
||||||
|
link="/login"
|
||||||
|
/>
|
||||||
<div className="h-screen flex items-center justify-center bg-gradient-to-r from-zinc-100 via-gray-200 to-zinc-100">
|
<div className="h-screen flex items-center justify-center bg-gradient-to-r from-zinc-100 via-gray-200 to-zinc-100">
|
||||||
{/* ... (other code) */}
|
<FloatingParticles />
|
||||||
<div className="w-1/4 h-1 flex items-center justify-center z-10">
|
<div className="w-1/4 h-1 flex items-center justify-center z-10">
|
||||||
<div className="w-96 bg-white rounded-lg p-8 space-y-4 z-10">
|
<div className="w-96 bg-white rounded-lg p-8 space-y-4 z-10">
|
||||||
{/* Register Form */}
|
{/* Register Form */}
|
||||||
@ -136,7 +141,10 @@ export function SignUp() {
|
|||||||
</button>
|
</button>
|
||||||
<div className="divider">OR</div>
|
<div className="divider">OR</div>
|
||||||
{/* Login with Google Button */}
|
{/* Login with Google Button */}
|
||||||
<button className="btn btn-outline btn-secondary w-full " onClick={() => googleLoginImplicit()}>
|
<button
|
||||||
|
className="btn btn-outline btn-secondary w-full "
|
||||||
|
onClick={() => googleLoginImplicit()}
|
||||||
|
>
|
||||||
<FcGoogle className="rounded-full bg-white" />
|
<FcGoogle className="rounded-full bg-white" />
|
||||||
Login with Google
|
Login with Google
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -2,13 +2,10 @@ import { FloatingParticles } from "../FlaotingParticles";
|
|||||||
|
|
||||||
export function LandingPage() {
|
export function LandingPage() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="h-screen flex items-center justify-center bg-gradient-to-r from-zinc-100 via-gray-200 to-zinc-100">
|
||||||
{/* Particles Container */}
|
{/* Particles Container */}
|
||||||
<FloatingParticles />
|
<FloatingParticles />
|
||||||
{/* Navbar */}
|
{/* Navbar */}
|
||||||
<div className="navbar bg-white z-10">
|
|
||||||
<div className="navbar-end space-x-3 z-10"></div>
|
|
||||||
</div>
|
|
||||||
<div className="relative" id="home">
|
<div className="relative" id="home">
|
||||||
<div className="max-w-7xl mx-auto px-6 md:px-12 xl:px-6">
|
<div className="max-w-7xl mx-auto px-6 md:px-12 xl:px-6">
|
||||||
<div className="relative pt-36 ml-auto">
|
<div className="relative pt-36 ml-auto">
|
||||||
@ -24,12 +21,18 @@ export function LandingPage() {
|
|||||||
</label>
|
</label>
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-8 text-#143D6C">Unleash productivity with our personal task and project management.</p>
|
<p className="mt-8 text-#143D6C">
|
||||||
|
Unleash productivity with our personal task and project
|
||||||
|
management.
|
||||||
|
</p>
|
||||||
<div className="mt-8 flex flex-wrap justify-center gap-y-4 gap-x-6">
|
<div className="mt-8 flex flex-wrap justify-center gap-y-4 gap-x-6">
|
||||||
<a
|
<a
|
||||||
href="/login"
|
href="/login"
|
||||||
className="relative flex h-11 w-full items-center justify-center px-6 before:absolute before:inset-0 before:rounded-full before:bg-primary before:transition before:duration-300 hover:before:scale-105 active:duration-75 active:before:scale-95 sm:w-max">
|
className="relative flex h-11 w-full items-center justify-center px-6 before:absolute before:inset-0 before:rounded-full before:bg-primary before:transition before:duration-300 hover:before:scale-105 active:duration-75 active:before:scale-95 sm:w-max"
|
||||||
<span className="relative text-base font-semibold text-white">Get started</span>
|
>
|
||||||
|
<span className="relative text-base font-semibold text-white">
|
||||||
|
Get started
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user