mirror of
https://github.com/TurTaskProject/TurTaskWeb.git
synced 2025-12-19 05:54:07 +01:00
Merge pull request #62 from TurTaskProject/feature/dashboard
Adjusting color in landing, login, register pages.
This commit is contained in:
commit
818666b710
@ -31,6 +31,7 @@
|
|||||||
"@syncfusion/ej2-base": "^23.1.41",
|
"@syncfusion/ej2-base": "^23.1.41",
|
||||||
"@syncfusion/ej2-kanban": "^23.1.36",
|
"@syncfusion/ej2-kanban": "^23.1.36",
|
||||||
"@tremor/react": "^3.11.1",
|
"@tremor/react": "^3.11.1",
|
||||||
|
"@wojtekmaj/react-daterange-picker": "^5.4.4",
|
||||||
"axios": "^1.6.1",
|
"axios": "^1.6.1",
|
||||||
"bootstrap": "^5.3.2",
|
"bootstrap": "^5.3.2",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
|
|||||||
@ -68,6 +68,9 @@ dependencies:
|
|||||||
'@tremor/react':
|
'@tremor/react':
|
||||||
specifier: ^3.11.1
|
specifier: ^3.11.1
|
||||||
version: 3.11.1(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.5)
|
version: 3.11.1(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.5)
|
||||||
|
'@wojtekmaj/react-daterange-picker':
|
||||||
|
specifier: ^5.4.4
|
||||||
|
version: 5.4.4(@types/react-dom@18.2.15)(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.6.1
|
specifier: ^1.6.1
|
||||||
version: 1.6.2
|
version: 1.6.2
|
||||||
@ -1554,6 +1557,29 @@ packages:
|
|||||||
resolution: {integrity: sha512-+i7+JmNiE/3c9FKxzWFi2IjRJ+KzZl1QPu6QNrsgaa2MuBgXvUy4gA1TVzf/JMdIIloB76xSKikTWuyYAIVLww==}
|
resolution: {integrity: sha512-+i7+JmNiE/3c9FKxzWFi2IjRJ+KzZl1QPu6QNrsgaa2MuBgXvUy4gA1TVzf/JMdIIloB76xSKikTWuyYAIVLww==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@wojtekmaj/react-daterange-picker@5.4.4(@types/react-dom@18.2.15)(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0):
|
||||||
|
resolution: {integrity: sha512-EoHFD2SHG1ZeBfdQ9NYaO9MzcdKXy8gikxxFlO3f7HJ/tOGI6/Vxt752sgNnCGsF4JlqVoWVHweyxYOExumRdA==}
|
||||||
|
peerDependencies:
|
||||||
|
'@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@types/react':
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@types/react': 18.2.37
|
||||||
|
clsx: 2.0.0
|
||||||
|
make-event-props: 1.6.2
|
||||||
|
prop-types: 15.8.1
|
||||||
|
react: 18.2.0
|
||||||
|
react-calendar: 4.6.1(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)
|
||||||
|
react-date-picker: 10.5.2(@types/react-dom@18.2.15)(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)
|
||||||
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
|
react-fit: 1.7.1(@types/react-dom@18.2.15)(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@types/react-dom'
|
||||||
|
dev: false
|
||||||
|
|
||||||
/acorn-jsx@5.3.2(acorn@8.11.2):
|
/acorn-jsx@5.3.2(acorn@8.11.2):
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|||||||
@ -7,14 +7,9 @@ const baseURL = import.meta.env.VITE_BASE_URL;
|
|||||||
const apiUserLogin = (data) => {
|
const apiUserLogin = (data) => {
|
||||||
return axiosInstance
|
return axiosInstance
|
||||||
.post("token/obtain/", data)
|
.post("token/obtain/", data)
|
||||||
.then((response) => {
|
.then((response) => response)
|
||||||
console.log(response.statusText);
|
|
||||||
|
|
||||||
return response;
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("apiUserLogin error: ", error);
|
throw error;
|
||||||
return error;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
91
frontend/src/components/FlaotingParticles.jsx
Normal file
91
frontend/src/components/FlaotingParticles.jsx
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
import { useCallback } from "react";
|
||||||
|
import Particles from "react-tsparticles";
|
||||||
|
import { loadFull } from "tsparticles";
|
||||||
|
|
||||||
|
export function FloatingParticles() {
|
||||||
|
const particlesInit = useCallback(async (engine) => {
|
||||||
|
await loadFull(engine);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
zIndex: 0,
|
||||||
|
backgroundColor: "#EBF2FA",
|
||||||
|
}}>
|
||||||
|
<Particles
|
||||||
|
id="particles"
|
||||||
|
init={particlesInit}
|
||||||
|
className="-z-10"
|
||||||
|
options={{
|
||||||
|
fpsLimit: 240,
|
||||||
|
smooth: true,
|
||||||
|
interactivity: {
|
||||||
|
events: {
|
||||||
|
onClick: {
|
||||||
|
enable: true,
|
||||||
|
mode: "push",
|
||||||
|
},
|
||||||
|
onHover: {
|
||||||
|
enable: true,
|
||||||
|
mode: "repulse",
|
||||||
|
},
|
||||||
|
resize: true,
|
||||||
|
},
|
||||||
|
modes: {
|
||||||
|
push: {
|
||||||
|
quantity: 4,
|
||||||
|
},
|
||||||
|
repulse: {
|
||||||
|
distance: 200,
|
||||||
|
duration: 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
particles: {
|
||||||
|
color: {
|
||||||
|
value: "#4f46e5",
|
||||||
|
},
|
||||||
|
links: {
|
||||||
|
color: "#818cf8",
|
||||||
|
distance: 150,
|
||||||
|
enable: true,
|
||||||
|
opacity: 0.5,
|
||||||
|
width: 1,
|
||||||
|
},
|
||||||
|
move: {
|
||||||
|
direction: "none",
|
||||||
|
enable: true,
|
||||||
|
outModes: {
|
||||||
|
default: "bounce",
|
||||||
|
},
|
||||||
|
random: false,
|
||||||
|
speed: 2,
|
||||||
|
straight: false,
|
||||||
|
},
|
||||||
|
number: {
|
||||||
|
density: {
|
||||||
|
enable: true,
|
||||||
|
area: 800,
|
||||||
|
},
|
||||||
|
value: 40,
|
||||||
|
},
|
||||||
|
opacity: {
|
||||||
|
value: 0.5,
|
||||||
|
},
|
||||||
|
shape: {
|
||||||
|
type: "square",
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
value: { min: 4, max: 5 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
detectRetina: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,26 +1,19 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
import { useNavigate, redirect } from "react-router-dom";
|
import { useNavigate, redirect } from "react-router-dom";
|
||||||
import { useGoogleLogin } from "@react-oauth/google";
|
import { useGoogleLogin } from "@react-oauth/google";
|
||||||
import { useCallback } from "react";
|
|
||||||
import Particles from "react-tsparticles";
|
|
||||||
import { loadFull } from "tsparticles";
|
|
||||||
import refreshAccessToken from "./refreshAcessToken";
|
|
||||||
import axiosapi from "../../api/AuthenticationApi";
|
import axiosapi from "../../api/AuthenticationApi";
|
||||||
import { FcGoogle } from "react-icons/fc";
|
import { FcGoogle } from "react-icons/fc";
|
||||||
import { useAuth } from "src/hooks/AuthHooks";
|
import { useAuth } from "src/hooks/AuthHooks";
|
||||||
|
import { FloatingParticles } from "../FlaotingParticles";
|
||||||
|
import { NavPreLogin } from "../navigations/NavPreLogin";
|
||||||
|
|
||||||
function LoginPage() {
|
function LoginPage() {
|
||||||
const { setIsAuthenticated } = useAuth();
|
const { setIsAuthenticated } = useAuth();
|
||||||
const Navigate = useNavigate();
|
const Navigate = useNavigate();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!refreshAccessToken()) {
|
|
||||||
Navigate("/");
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
|
const [error, setError] = useState(null);
|
||||||
|
|
||||||
const handleEmailChange = (event) => {
|
const handleEmailChange = (event) => {
|
||||||
setEmail(event.target.value);
|
setEmail(event.target.value);
|
||||||
@ -29,6 +22,7 @@ function LoginPage() {
|
|||||||
const handlePasswordChange = (event) => {
|
const handlePasswordChange = (event) => {
|
||||||
setPassword(event.target.value);
|
setPassword(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = (event) => {
|
const handleSubmit = (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@ -39,16 +33,13 @@ function LoginPage() {
|
|||||||
password: password,
|
password: password,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// On successful login, store tokens and set the authorization header
|
|
||||||
localStorage.setItem("access_token", res.data.access);
|
localStorage.setItem("access_token", res.data.access);
|
||||||
localStorage.setItem("refresh_token", res.data.refresh);
|
localStorage.setItem("refresh_token", res.data.refresh);
|
||||||
axiosapi.axiosInstance.defaults.headers["Authorization"] = "Bearer " + res.data.access;
|
|
||||||
setIsAuthenticated(true);
|
setIsAuthenticated(true);
|
||||||
redirect("/");
|
redirect("/");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("Login failed");
|
setError("Incorrect username or password");
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,144 +63,80 @@ function LoginPage() {
|
|||||||
},
|
},
|
||||||
onError: (errorResponse) => console.log(errorResponse),
|
onError: (errorResponse) => console.log(errorResponse),
|
||||||
});
|
});
|
||||||
{
|
|
||||||
/* Particles Loader*/
|
|
||||||
}
|
|
||||||
const particlesInit = useCallback(async (engine) => {
|
|
||||||
console.log(engine);
|
|
||||||
await loadFull(engine);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const particlesLoaded = useCallback(async (container) => {
|
|
||||||
console.log(container);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div data-theme="night" className="h-screen flex items-center justify-center">
|
<div>
|
||||||
{/* Particles Container */}
|
<NavPreLogin text="Don't have account?" btn_text="Sign Up" link="/signup" />
|
||||||
<div style={{ width: "0%", height: "100vh" }}>
|
<div className="flex flex-row bg-neutral-400">
|
||||||
<Particles
|
{/* Login Box */}
|
||||||
id="particles"
|
<div className="flex items-center justify-center flex-1 z-50">
|
||||||
init={particlesInit}
|
<div className="w-100 bg-white border-solid rounded-lg p-8 shadow space-y-4">
|
||||||
loaded={particlesLoaded}
|
<h2 className="text-3xl font-bold">Log in to your account</h2>
|
||||||
className="-z-10"
|
{/* Error Message */}
|
||||||
options={{
|
{error && (
|
||||||
fpsLimit: 240,
|
<div role="alert" className="alert alert-error">
|
||||||
interactivity: {
|
<svg
|
||||||
events: {
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
onClick: {
|
className="stroke-current shrink-0 h-6 w-6"
|
||||||
enable: true,
|
fill="none"
|
||||||
mode: "push",
|
viewBox="0 0 24 24">
|
||||||
},
|
<path
|
||||||
onHover: {
|
strokeLinecap="round"
|
||||||
enable: true,
|
strokeLinejoin="round"
|
||||||
mode: "repulse",
|
strokeWidth="2"
|
||||||
},
|
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||||
resize: true,
|
/>
|
||||||
},
|
</svg>
|
||||||
modes: {
|
<span>{error}</span>
|
||||||
push: {
|
</div>
|
||||||
quantity: 4,
|
)}
|
||||||
},
|
{/* Email Input */}
|
||||||
repulse: {
|
<div className="form-control ">
|
||||||
distance: 200,
|
<label className="label" htmlFor="email">
|
||||||
duration: 0.4,
|
<p className="text-bold">
|
||||||
},
|
Email<span className="text-red-500 text-bold">*</span>
|
||||||
},
|
</p>
|
||||||
},
|
</label>
|
||||||
particles: {
|
<input
|
||||||
color: {
|
className="input"
|
||||||
value: "#008000",
|
type="email"
|
||||||
},
|
id="email"
|
||||||
links: {
|
placeholder="Enter your email"
|
||||||
color: "#00ff00",
|
value={email}
|
||||||
distance: 150,
|
onChange={handleEmailChange}
|
||||||
enable: true,
|
/>
|
||||||
opacity: 0.5,
|
</div>
|
||||||
width: 1,
|
{/* Password Input */}
|
||||||
},
|
<div className="form-control">
|
||||||
move: {
|
<label className="label" htmlFor="password">
|
||||||
direction: "none",
|
<p className="text-bold">
|
||||||
enable: true,
|
Password<span className="text-red-500 text-bold">*</span>
|
||||||
outModes: {
|
</p>
|
||||||
default: "bounce",
|
</label>
|
||||||
},
|
<input
|
||||||
random: false,
|
className="input"
|
||||||
speed: 4,
|
type="password"
|
||||||
straight: false,
|
id="password"
|
||||||
},
|
placeholder="Enter your password"
|
||||||
number: {
|
value={password}
|
||||||
density: {
|
onChange={handlePasswordChange}
|
||||||
enable: true,
|
/>
|
||||||
area: 800,
|
</div>
|
||||||
},
|
{/* Login Button */}
|
||||||
value: 50,
|
<button className="btn bg-blue-700 hover:bg-blue-900 w-full text-white font-bold" onClick={handleSubmit}>
|
||||||
},
|
Login
|
||||||
opacity: {
|
</button>
|
||||||
value: 0.5,
|
<div className="divider">OR</div>
|
||||||
},
|
{/* Login with Google Button */}
|
||||||
shape: {
|
<button className="btn bg-gray-200 btn-outline w-full " onClick={() => googleLoginImplicit()}>
|
||||||
type: "circle",
|
<FcGoogle className="rounded-full bg-white" />
|
||||||
},
|
Login with Google
|
||||||
size: {
|
</button>
|
||||||
value: { min: 4, max: 5 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
detectRetina: true,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Login Box */}
|
|
||||||
<div className="w-1/4 flex items-center justify-center">
|
|
||||||
<div className="w-96 bg-neutral rounded-lg p-8 shadow-md space-y-4 z-10">
|
|
||||||
<h2 className="text-3xl font-bold text-center">Login</h2>
|
|
||||||
{/* Email Input */}
|
|
||||||
<div className="form-control ">
|
|
||||||
<label className="label" htmlFor="email">
|
|
||||||
<p className="text-bold">
|
|
||||||
Email<span className="text-red-500 text-bold">*</span>
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
className="input"
|
|
||||||
type="email"
|
|
||||||
id="email"
|
|
||||||
placeholder="Enter your email"
|
|
||||||
onChange={handleEmailChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Password Input */}
|
|
||||||
<div className="form-control">
|
|
||||||
<label className="label" htmlFor="password">
|
|
||||||
<p className="text-bold">
|
|
||||||
Password<span className="text-red-500 text-bold">*</span>
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
className="input"
|
|
||||||
type="password"
|
|
||||||
id="password"
|
|
||||||
placeholder="Enter your password"
|
|
||||||
onChange={handlePasswordChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Login Button */}
|
|
||||||
<button className="btn btn-success w-full " onClick={handleSubmit}>
|
|
||||||
Login
|
|
||||||
</button>
|
|
||||||
<div className="divider">OR</div>
|
|
||||||
{/* Login with Google Button */}
|
|
||||||
<button className="btn btn-outline btn-secondary w-full " onClick={() => googleLoginImplicit()}>
|
|
||||||
<FcGoogle className="rounded-full bg-white" />
|
|
||||||
Login with Google
|
|
||||||
</button>
|
|
||||||
{/* Forgot Password Link */}
|
|
||||||
<div className="justify-left">
|
|
||||||
<a href="#" className="text-blue-500 text-sm text-left">
|
|
||||||
Forgot your password?
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="basis-1/2 bg-#ebf2fa h-screen z-0">
|
||||||
|
<FloatingParticles />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,29 +1,15 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import axiosapi from "../../api/AuthenticationApi";
|
import axiosapi from "../../api/AuthenticationApi";
|
||||||
import { useCallback } from "react";
|
|
||||||
import Particles from "react-tsparticles";
|
|
||||||
import { loadFull } from "tsparticles";
|
|
||||||
import { FcGoogle } from "react-icons/fc";
|
import { FcGoogle } from "react-icons/fc";
|
||||||
import { useGoogleLogin } from "@react-oauth/google";
|
import { useGoogleLogin } from "@react-oauth/google";
|
||||||
|
import { NavPreLogin } from "../navigations/NavPreLogin";
|
||||||
import { useAuth } from "src/hooks/AuthHooks";
|
import { useAuth } from "src/hooks/AuthHooks";
|
||||||
|
|
||||||
function Copyright(props) {
|
|
||||||
return (
|
|
||||||
<div className="text-center text-sm text-gray-500" {...props}>
|
|
||||||
{"Copyright © "}
|
|
||||||
<a href="https://github.com/TurTaskProject/TurTaskWeb" className="text-blue-500 hover:underline">
|
|
||||||
TurTask
|
|
||||||
</a>{" "}
|
|
||||||
{new Date().getFullYear()}
|
|
||||||
{"."}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function SignUp() {
|
export default function SignUp() {
|
||||||
const Navigate = useNavigate();
|
const Navigate = useNavigate();
|
||||||
const { setIsAuthenticated } = useAuth;
|
const { setIsAuthenticated } = useAuth();
|
||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
email: "",
|
email: "",
|
||||||
@ -52,19 +38,7 @@ export default function SignUp() {
|
|||||||
const handleChange = (e) => {
|
const handleChange = (e) => {
|
||||||
const { name, value } = e.target;
|
const { name, value } = e.target;
|
||||||
setFormData({ ...formData, [name]: value });
|
setFormData({ ...formData, [name]: value });
|
||||||
console.log(formData);
|
|
||||||
};
|
};
|
||||||
{
|
|
||||||
/* Particles Loader*/
|
|
||||||
}
|
|
||||||
const particlesInit = useCallback(async (engine) => {
|
|
||||||
console.log(engine);
|
|
||||||
await loadFull(engine);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const particlesLoaded = useCallback(async (container) => {
|
|
||||||
console.log(container);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const googleLoginImplicit = useGoogleLogin({
|
const googleLoginImplicit = useGoogleLogin({
|
||||||
flow: "auth-code",
|
flow: "auth-code",
|
||||||
@ -89,140 +63,73 @@ export default function SignUp() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div data-theme="night" className="h-screen flex items-center justify-center">
|
<div>
|
||||||
{/* Particles Container */}
|
<NavPreLogin text="Already have account?" btn_text="Log In" link="/login" />
|
||||||
<div style={{ width: "0%", height: "100vh" }}>
|
<div className="h-screen flex items-center justify-center bg-gradient-to-r from-zinc-100 via-gray-200 to-zinc-100">
|
||||||
<Particles
|
<div aria-hidden="true" className="absolute inset-0 grid grid-cols-2 -space-x-52 opacity-40">
|
||||||
id="particles"
|
<div className="blur-[106px] h-56 bg-gradient-to-br from-primary to-purple-400"></div>
|
||||||
init={particlesInit}
|
<div className="blur-[106px] h-32 bg-gradient-to-r from-cyan-400 to-sky-300"></div>
|
||||||
loaded={particlesLoaded}
|
</div>
|
||||||
className="-z-10"
|
<div className="w-1/4 h-1 flex items-center justify-center z-10">
|
||||||
options={{
|
<div className="w-96 bg-white rounded-lg p-8 space-y-4 z-10">
|
||||||
fpsLimit: 240,
|
{/* Register Form */}
|
||||||
interactivity: {
|
<h2 className="text-3xl font-bold text-center">Signup</h2>
|
||||||
events: {
|
{/* Email Input */}
|
||||||
onClick: {
|
<div className="form-control ">
|
||||||
enable: true,
|
<label className="label" htmlFor="email">
|
||||||
mode: "push",
|
<p className="text-bold">
|
||||||
},
|
Email<span className="text-red-500 text-bold">*</span>
|
||||||
onHover: {
|
</p>
|
||||||
enable: true,
|
</label>
|
||||||
mode: "repulse",
|
<input className="input" type="email" id="email" placeholder="Enter your email" onChange={handleChange} />
|
||||||
},
|
</div>
|
||||||
resize: true,
|
{/* Username Input */}
|
||||||
},
|
<div className="form-control">
|
||||||
modes: {
|
<label className="label" htmlFor="Username">
|
||||||
push: {
|
<p className="text-bold">
|
||||||
quantity: 4,
|
Username<span className="text-red-500 text-bold">*</span>
|
||||||
},
|
</p>
|
||||||
repulse: {
|
</label>
|
||||||
distance: 200,
|
<input
|
||||||
duration: 0.4,
|
className="input"
|
||||||
},
|
type="text"
|
||||||
},
|
id="Username"
|
||||||
},
|
placeholder="Enter your username"
|
||||||
particles: {
|
onChange={handleChange}
|
||||||
color: {
|
/>
|
||||||
value: "#023020",
|
</div>
|
||||||
},
|
{/* Password Input */}
|
||||||
links: {
|
<div className="form-control">
|
||||||
color: "#228B22",
|
<label className="label" htmlFor="password">
|
||||||
distance: 150,
|
<p className="text-bold">
|
||||||
enable: true,
|
Password<span className="text-red-500 text-bold">*</span>
|
||||||
opacity: 1,
|
</p>
|
||||||
width: 1,
|
</label>
|
||||||
},
|
<input
|
||||||
move: {
|
className="input"
|
||||||
direction: "none",
|
type="password"
|
||||||
enable: true,
|
id="password"
|
||||||
outModes: {
|
placeholder="Enter your password"
|
||||||
default: "bounce",
|
onChange={handleChange}
|
||||||
},
|
/>
|
||||||
random: false,
|
</div>
|
||||||
speed: 4,
|
<br></br>
|
||||||
straight: false,
|
|
||||||
},
|
|
||||||
number: {
|
|
||||||
density: {
|
|
||||||
enable: true,
|
|
||||||
area: 800,
|
|
||||||
},
|
|
||||||
value: 50,
|
|
||||||
},
|
|
||||||
opacity: {
|
|
||||||
value: 0.6,
|
|
||||||
},
|
|
||||||
shape: {
|
|
||||||
type: "circle",
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
value: { min: 6, max: 8 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
detectRetina: true,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="w-1/4 h-1 flex items-center justify-center">
|
|
||||||
<div className="w-96 bg-neutral rounded-lg p-8 shadow-md space-y-4 z-10">
|
|
||||||
{/* Register Form */}
|
|
||||||
<h2 className="text-3xl font-bold text-center">Signup</h2>
|
|
||||||
{/* Email Input */}
|
|
||||||
<div className="form-control ">
|
|
||||||
<label className="label" htmlFor="email">
|
|
||||||
<p className="text-bold">
|
|
||||||
Email<span className="text-red-500 text-bold">*</span>
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
<input className="input" type="email" id="email" placeholder="Enter your email" onChange={handleChange} />
|
|
||||||
</div>
|
|
||||||
{/* Username Input */}
|
|
||||||
<div className="form-control">
|
|
||||||
<label className="label" htmlFor="Username">
|
|
||||||
<p className="text-bold">
|
|
||||||
Username<span className="text-red-500 text-bold">*</span>
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
className="input"
|
|
||||||
type="text"
|
|
||||||
id="Username"
|
|
||||||
placeholder="Enter your username"
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Password Input */}
|
|
||||||
<div className="form-control">
|
|
||||||
<label className="label" htmlFor="password">
|
|
||||||
<p className="text-bold">
|
|
||||||
Password<span className="text-red-500 text-bold">*</span>
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
className="input"
|
|
||||||
type="password"
|
|
||||||
id="password"
|
|
||||||
placeholder="Enter your password"
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<br></br>
|
|
||||||
|
|
||||||
{/* Signups Button */}
|
{/* Signups Button */}
|
||||||
<button className="btn btn-success w-full " onClick={handleSubmit}>
|
<button className="btn btn-success w-full " onClick={handleSubmit}>
|
||||||
Signup
|
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>
|
||||||
{/* Already have an account? */}
|
{/* Already have an account? */}
|
||||||
<div className="text-blue-500 flex justify-center text-sm">
|
<div className="text-blue-500 flex justify-center text-sm">
|
||||||
<a href="login">Already have an account?</a>
|
<a href="login">Already have an account?</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Copyright />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,13 +4,20 @@ import { BarChartGraph } from "./Barchart";
|
|||||||
import DonutChartGraph from "./DonutChart";
|
import DonutChartGraph from "./DonutChart";
|
||||||
import { AreaChartGraph } from "./Areachart";
|
import { AreaChartGraph } from "./Areachart";
|
||||||
import ProgressCircleChart from "./ProgressCircle";
|
import ProgressCircleChart from "./ProgressCircle";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
|
const [value, setValue] = useState({
|
||||||
|
from: new Date(2021, 0, 1),
|
||||||
|
to: new Date(2023, 0, 7),
|
||||||
|
});
|
||||||
|
console.log(value);
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col p-12">
|
<div className="flex flex-col p-12">
|
||||||
<div>
|
<div>
|
||||||
<Title>Dashboard</Title>
|
<Title>Dashboard</Title>
|
||||||
<Text>All of your progress will be shown right here.</Text>
|
<Text>All of your progress will be shown right here.</Text>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ function TaskCard({ task, deleteTask, updateTask}) {
|
|||||||
description={task.description}
|
description={task.description}
|
||||||
tags={task.tags}
|
tags={task.tags}
|
||||||
difficulty={task.difficulty}
|
difficulty={task.difficulty}
|
||||||
challenge={task.challenge}
|
f challenge={task.challenge}
|
||||||
importance={task.importance}
|
importance={task.importance}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -1,28 +1,19 @@
|
|||||||
|
import { FloatingParticles } from "../FlaotingParticles";
|
||||||
|
|
||||||
export function LandingPage() {
|
export function LandingPage() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="navbar bg-base-100">
|
{/* Particles Container */}
|
||||||
<div className="navbar-start">
|
<FloatingParticles />
|
||||||
<a className="btn btn-ghost text-xl">TurTask</a>
|
{/* Navbar */}
|
||||||
</div>
|
<div className="navbar bg-white z-10">
|
||||||
<div className="navbar-end space-x-3 pr-2">
|
<div className="navbar-end space-x-3 z-10"></div>
|
||||||
<a className="btn" href="/login">
|
|
||||||
Login
|
|
||||||
</a>
|
|
||||||
<a className="btn" href="/signup">
|
|
||||||
Sign Up
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="relative" id="home">
|
<div className="relative" id="home">
|
||||||
<div aria-hidden="true" className="absolute inset-0 grid grid-cols-2 -space-x-52 opacity-40">
|
|
||||||
<div className="blur-[106px] h-56 bg-gradient-to-br from-primary to-purple-400"></div>
|
|
||||||
<div className="blur-[106px] h-32 bg-gradient-to-r from-cyan-400 to-sky-300"></div>
|
|
||||||
</div>
|
|
||||||
<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">
|
||||||
<div className="lg:w-2/3 text-center mx-auto">
|
<div className="lg:w-2/3 text-center mx-auto">
|
||||||
<h1 className="text-gray-900 font-bold text-5xl md:text-6xl xl:text-7xl">
|
<h1 className="text-#143D6C font-bold text-5xl md:text-6xl xl:text-7xl">
|
||||||
Manage your task with{" "}
|
Manage your task with{" "}
|
||||||
<span className="text-primary">
|
<span className="text-primary">
|
||||||
TurTask
|
TurTask
|
||||||
@ -33,21 +24,13 @@ export function LandingPage() {
|
|||||||
</label>
|
</label>
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-8 text-gray-700">
|
<p className="mt-8 text-#143D6C">Unleash productivity with our personal task and project management.</p>
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Odio incidunt nam itaque sed eius modi error
|
<div className="mt-8 flex flex-wrap justify-center gap-y-4 gap-x-6">
|
||||||
totam sit illum. Voluptas doloribus asperiores quaerat aperiam. Quidem harum omnis beatae ipsum soluta!
|
|
||||||
</p>
|
|
||||||
<div className="mt-16 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>
|
||||||
<a
|
|
||||||
href="#"
|
|
||||||
className="relative flex h-11 w-full items-center justify-center px-6 before:absolute before:inset-0 before:rounded-full before:border before:border-transparent before:bg-primary/10 before:bg-gradient-to-b 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-primary">Placeholder</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
16
frontend/src/components/navigations/NavPreLogin.jsx
Normal file
16
frontend/src/components/navigations/NavPreLogin.jsx
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
|
export const NavPreLogin = ({ text, btn_text, link }) => {
|
||||||
|
return (
|
||||||
|
<div className="navbar bg-base-100 sticky top-0 z-50 border-2 border-neutral-400">
|
||||||
|
<div className="navbar-start"></div>
|
||||||
|
<div className="navbar-center hidden lg:flex"></div>
|
||||||
|
<div className="navbar-end space-x-3">
|
||||||
|
<p className="font-bold">{text}</p>
|
||||||
|
<Link to={link} className="btn bg-blue-700 hover:bg-blue-900 text-white font-bold">
|
||||||
|
{btn_text}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
1
package.json
Normal file
1
package.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
5
pnpm-lock.yaml
Normal file
5
pnpm-lock.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
lockfileVersion: '6.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
Loading…
Reference in New Issue
Block a user