Skip to content

Commit

Permalink
Merge pull request #73 from Code-Odyssey-Editor/Kanishq-Mehta
Browse files Browse the repository at this point in the history
Kanishq mehta
  • Loading branch information
tymnec authored Nov 17, 2023
2 parents 4823d59 + ab58f5b commit 2a730bb
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 155 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Root() {
<Route path="/contact" Component={contactpage} />
<Route path="/sign-in" Component={SignIn} />
<Route path="/sign-up" Component={Signup} />
<Route path="/forgot_p" Component={forgotpassword} />
<Route path="/forgot-password" Component={forgotpassword}/>
</Routes>
);
}
Expand Down
107 changes: 0 additions & 107 deletions src/pages/auth/forgotpassword.tsx
Original file line number Diff line number Diff line change
@@ -1,107 +0,0 @@
import { motion } from 'framer-motion';
import React from "react";
import { Link } from "react-router-dom";
import { RiLockPasswordLine } from "react-icons/ri";
import { Button, Input } from "@nextui-org/react";
import { BiUserCircle } from "react-icons/bi";

const forgotpassword: React.FC = () => {
return (
<div className="fixed inset-0 z-0">
{[...Array(100)].map((_, index) => (
<motion.div
key={index}
initial={{
opacity: 0,
scale: Math.random() * 0.5 + 0.2,
rotate: Math.random() * 360,
x: Math.random() * 100 - 50,
y: Math.random() * 100 - 50,
}}
animate={{
opacity: 1,
scale: Math.random() * 0.5 + 0.2,
rotate: Math.random() * 360,
x: Math.random() * 100 - 50,
y: Math.random() * 100 - 50,
transition: {
repeat: Infinity,
repeatType: 'reverse',
duration: Math.random() * 3 + 1,
ease: 'linear',
},
}}
className="absolute bg-white w-1 h-1 rounded-full"
style={{
left: `${Math.random() * 100}vw`,
top: `${Math.random() * 100}vh`,
}}
/>
))}
<body className="bg-black">

<section className="flex flex-col items-center justify-center w-full flex-1 px-18 text-center min-h-screen">

<div className="bg-white rounded-2xl shadow-2xl flex w-1/2 max-w-4xl">
<div className="w-3/5 p-4">{/* Sign in */}
<div className="text-left font-bold">
<span className="text-green-500"> Code Odessay</span> Editor
</div>
<div className="py-10">
<h2 className="text-2xl font-bold text-green-500 mb-10">Forgot Password</h2>

<div className="flex flex-col items-center">
<div className="bg-gray-100 w-64 p-2 flex items-center mb-3 rounded-full">
<BiUserCircle className="mr-2 ml-2" />
<div className="">
<Input type="text" placeholder="Enter your username" className="outline-none" />
</div>
</div>


<div className="bg-gray-100 w-64 p-2 flex items-center mb-3 rounded-full">
<RiLockPasswordLine className="mr-2 ml-2" />
<div className="">
<Input type="password" placeholder="Enter Password" className="outline-none " />
</div>
</div>

<div className="bg-gray-100 w-64 p-2 flex items-center mb-3 rounded-full">
<RiLockPasswordLine className="mr-2 ml-2" />
<div className="">
<Input type="password" placeholder="Confirm Password" className="outline-none " />
</div>
</div>
<div className="flex justify-between w-64 mb-5 text-sm">
<Link to="/sign-in">
<p>Back to Signin page?</p>
</Link>

</div>
<Button className=" mb-2 border-2 border-green-500 rounded-full inline-block text-green-500 hover:bg-green-500 hover:text-white hover:border-white">
Forgot Password
</Button>

</div >

</div>


</div>
<div className="w-1/2 bg-green-600 text-white rounded-tr-2xl rounded-br-2xl py-36 px-12">{/* Sign up */}
<h2 className="text-3xl font-bold mb-2 overflow-hidden ">Hello, Friend!</h2>
<image href="logo" />
<div className="border-2 w-10 border-white inline-block mb-2"></div>
<p className="mb-10 "> Fill up the information to start journey with us</p>
<Button color="success" className="border-2 border-white rounded-full inline-block text-white hover:bg-slate-50 hover:text-green-500 hover:border-green-500">
Sign Up
</Button>
</div>
</div>
</section>
</body>
</div >

);
}
export default forgotpassword;
16 changes: 16 additions & 0 deletions src/pages/auth/signinpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MdEmail } from "react-icons/md";
import { RiLockPasswordLine } from "react-icons/ri";
import { Button, Input } from "@nextui-org/react";
import { motion } from 'framer-motion';
import CommonNavbar from "../../components/navbar/common_navbar";


function SignIn() {
Expand Down Expand Up @@ -41,6 +42,21 @@ function SignIn() {
/>
))}
<body className="bg-black">
{/* Common Navbar */}
<motion.div
initial={{ opacity: 0, y: 100 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.5,
delay: 0.1,
type: "spring",
stiffness: 100,
damping: 10,
}}
>
<CommonNavbar />
</motion.div>


<section className="flex flex-col items-center justify-center w-full flex-1 px-18 text-center min-h-screen">

Expand Down
116 changes: 69 additions & 47 deletions src/pages/auth/signuppage.tsx
Original file line number Diff line number Diff line change
@@ -1,62 +1,84 @@
import React from "react";
import { Image, Input, Button, Checkbox, Link } from "@nextui-org/react";
import CommonNavbar from "../../components/navbar/common_navbar";
import { motion } from "framer-motion";

const Signup: React.FC = () => {
return (
<div className="bg-gray-300 min-h-screen flex items-center justify-center">
<div className="bg-gray-200 flex rounded-2xl shadow-lg max-w-3xl p-5 lg:flex-row flex-col h-full">
<div className="w-1/2 mt-5 pr-1 pl-2 ">
<Image
isZoomed
alt="NextUI Fruit Image with Zoom"
src="https://nextui-docs-v2.vercel.app/images/fruit-1.jpeg"
className="object-cover w-full h-full"
/>
</div>
<>
{/* Common Navbar */}
<motion.div
initial={{ opacity: 0, y: 100 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.5,
delay: 0.1,
type: "spring",
stiffness: 100,
damping: 10,
}}
>
<CommonNavbar />
</motion.div>
<div className="bg-gray-300 min-h-screen flex items-center justify-center">
<div className="bg-gray-200 flex rounded-2xl shadow-lg max-w-3xl p-5 lg:flex-row flex-col h-full">
<div className="w-1/2 mt-5 pr-1 pl-2 ">
<Image
isZoomed
alt="NextUI Fruit Image with Zoom"
src="https://nextui-docs-v2.vercel.app/images/fruit-1.jpeg"
className="object-cover w-full h-full"
/>
</div>

<div className="rounded-tl-3xl bg-gradient-to-r from-gray-700 via-white-500 to-slate-800 w-full lg:w-1/2 p-6">
<div className="">
<h2 className="text-white font-bold text-2xl">Welcome</h2>
<p className="text-white text-xs mt-4">
We are glad to see you back with us
</p>
<form>
<Input
type="email"
id="email"
label="Email"
defaultValue=""
className="max-w-[290px] mt-5"
/>
<div className="rounded-tl-3xl bg-gradient-to-r from-gray-700 via-white-500 to-slate-800 w-full lg:w-1/2 p-6">
<div className="">
<h2 className="text-white font-bold text-2xl">Welcome</h2>
<p className="text-white text-xs mt-4">
We are glad to see you back with us
</p>
<form>
<Input
type="email"
id="email"
label="Email"
defaultValue=""
className="max-w-[290px] mt-5"
/>

<Input
type="password"
id="password"
label="Password"
defaultValue=""
className="max-w-[290px] mt-5"
/>
<Input
type="password"
id="password"
label="Password"
defaultValue=""
className="max-w-[290px] mt-5"
/>

<div className="flex items-center mt-6">
<Checkbox defaultSelected>Remember me</Checkbox>
<Link color="primary" href="/forgot-password" className="ml-6">
Forgot Password?
</Link>
</div>
<div className="flex items-center mt-6">
<Checkbox defaultSelected>Remember me</Checkbox>
<Link
color="primary"
href="/forgot-password"
className="ml-6"
>
Forgot Password?
</Link>
</div>

<div className="pl-28">
<Button
className="max-w-[290px] mt-6 max-h-[30px]"
color="primary"
>
Sign In
</Button>
</div>
</form>
<div className="pl-28">
<Button
className="max-w-[290px] mt-6 max-h-[30px]"
color="primary"
>
Sign In
</Button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</>
);
};

Expand Down
1 change: 1 addition & 0 deletions src/pages/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useState, useRef, useLayoutEffect } from "react";
import MonacoEditor from "react-monaco-editor";
import CommonNavbar from "../../components/navbar/common_navbar";
import { useTheme } from "next-themes";
import { motion } from "framer-motion";

Check failure on line 15 in src/pages/editor/editor.tsx

View workflow job for this annotation

GitHub Actions / deploy

'motion' is declared but its value is never read.

export const editor = () => {
const [code, setCode] = useState(""); // Initialize code state with an empty string
Expand Down

0 comments on commit 2a730bb

Please sign in to comment.