Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes in the forms and change of margin in header of learning path #140

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/assets/icons/sign-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/signout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 13 additions & 9 deletions src/app/(auth)/sign-out/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { signOut } from "next-auth/react";
const SignOut = () => {
return (
<div className=" relative h-screen overflow-hidden flex py-10 flex-col items-center justify-center flex-0 flex-auto lg:px-0">
<Card className="sm:bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<Card className="sm:bg-color-6 bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<CardHeader className="space-y-1">
<CardTitle className="text-2xl text-center sm:text-left">
Sign Out
</CardTitle>
<CardTitle className="text-2xl text-center ">Sign Out</CardTitle>
</CardHeader>
<CardContent>
<div className="flex flex-col text-center w-full space-y-4 mt-1">
Expand All @@ -22,10 +20,16 @@ const SignOut = () => {
<div className="flex flex-col justify-center items-center gap-1 mt-8">
<Button
onClick={() => signOut({ callbackUrl: "/sign-in" })}
className="w-full font-bold text-md max-w-72"
className=" px-5 font-bold text-md gap-4 "
type="submit"
>
Sign out
<Image
src="/assets/icons/sign-out.png"
width={20}
height={20}
alt=""
/>
</Button>
<Link
className={buttonVariants({
Expand All @@ -45,23 +49,23 @@ const SignOut = () => {
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[80rem] h-[75rem] left-[-20rem] top-[5rem] opacity-60 mdxs:block lg:block hidden "
className="fixed min-[1680px]:hidden -z-10 w-[80rem] h-[75rem] left-[-20rem] top-[5rem] opacity-60 mdxs:block lg:block hidden "
/>
<Image
src="/assets/icons/Ellipse3.svg"
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[68.0625rem] mdxs:block h-[56.5rem] left-[-16rem] top-[16rem] opacity-50 lg:block hidden"
className="fixed min-[1680px]:hidden -z-10 w-[68.0625rem] mdxs:block h-[56.5rem] left-[-16rem] top-[16rem] opacity-50 lg:block hidden"
/>
<Image
src="/assets/icons/Ellipse3.svg"
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[51.5rem] h-[44.5rem] left-[-10rem] mdxs:block top-[24rem] overflow-hidden opacity-50 lg:block hidden"
className="fixed min-[1680px]:hidden -z-10 w-[51.5rem] h-[44.5rem] left-[-10rem] mdxs:block top-[24rem] overflow-hidden opacity-50 lg:block hidden"
/>
<div className="fixed min-[1536px]:hidden -z-10 w-[15rem] h-[15rem] left-[5rem] bg-color-2 rounded-full blur-2xl bottom-[-10rem] opacity-50 lg:block hidden" />
<div className="fixed min-[1680px]:hidden mdxs:block -z-10 w-[15rem] h-[15rem] left-[5rem] bg-color-2 rounded-full blur-2xl bottom-[-10rem] opacity-50 lg:block hidden" />
</div>
);
};
Expand Down
8 changes: 4 additions & 4 deletions src/app/(auth)/sign-up/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ function Page() {
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[80rem] h-[75rem] left-[-20rem] top-[5rem] opacity-60 lg:block hidden "
className="fixed min-[1680px]:hidden -z-10 w-[80rem] h-[75rem] left-[-20rem] top-[5rem] opacity-60 lg:block hidden "
/>
<Image
src="/assets/icons/Ellipse3.svg"
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[68.0625rem] h-[56.5rem] left-[-16rem] top-[16rem] opacity-50 lg:block hidden"
className="fixed min-[1680px]:hidden -z-10 w-[68.0625rem] h-[56.5rem] left-[-16rem] top-[16rem] opacity-50 lg:block hidden"
/>
<Image
src="/assets/icons/Ellipse3.svg"
alt="Ellipse"
height={100}
width={24}
className="fixed min-[1536px]:hidden -z-10 w-[51.5rem] h-[44.5rem] left-[-10rem] top-[24rem] overflow-hidden opacity-50 lg:block hidden"
className="fixed min-[1680px]:hidden -z-10 w-[51.5rem] h-[44.5rem] left-[-10rem] top-[24rem] overflow-hidden opacity-50 lg:block hidden"
/>
<div className="fixed min-[1536px]:hidden -z-10 w-[15rem] h-[15rem] left-[5rem] bg-color-2 rounded-full blur-2xl bottom-[-10rem] opacity-50 lg:block hidden" />
<div className="fixed min-[1680px]:hidden -z-10 w-[15rem] h-[15rem] left-[5rem] bg-color-2 rounded-full blur-2xl bottom-[-10rem] opacity-50 lg:block hidden" />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/verifyemail/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const EmailVerificationPage = async (props) => {
) : (
<>
<div className="fixed min-[1536px]:hidden -z-10 w-[15rem] mdxs:block h-[15rem] left-[5rem] bg-color-2 rounded-full blur-2xl bottom-[-10rem] opacity-50 lg:block hidden" />
<Card className="sm:bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<Card className="sm:bg-color-6 w-full h-auto sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<CardHeader className="space-y-1">
<CardTitle className="text-2xl text-center flex-col justify-center items-center sm:text-left">
Opps.. Something Went Wrong!
Expand Down
2 changes: 2 additions & 0 deletions src/app/learning-paths/[domain]/[id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import LearningPathHeader from "@/components/learningPath/LearningPathHeader";
import LearningPathActions from "@/components/learningPath/LearningPathActions";
import { calculateProgress } from "@/data/dashboard";
import { getLearningPathData } from "@/data/learning-paths";
import Navbar from "@/components/ui/Navbar";

const page = async ({ params }) => {
const session = await getServerSession(authOptions);
Expand All @@ -17,6 +18,7 @@ const page = async ({ params }) => {
await calculateProgress(learningPathData, session);
return (
<>
<Navbar />
<LearningPathHeader
title={title}
description={description}
Expand Down
2 changes: 1 addition & 1 deletion src/app/learning-paths/edit/[id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getLearningPathData = async (id) => {
const EditPage = async ({ params }) => {
const learningPathData = await getLearningPathData(params.id);
return (
<div className="h-auto flex justify-center items-centers mt-10 ">
<div className="h-screen flex justify-center items-centers mt-10 ">
<EditForm learningPathData={learningPathData} />
{/* Background */}
<Image
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/sign-in/login-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function LoginForm({ callbackUrl }) {

return (
<form onSubmit={handleSubmit} className="space-y-8 flex justify-center">
<Card className="sm:bg-color-6 sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none w-full">
<Card className="sm:bg-color-6 bg-color-6 sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none w-full">
<CardHeader className="space-y-1">
<CardTitle className="text-2xl flex justify-center">LOGIN</CardTitle>
</CardHeader>
Expand Down
136 changes: 70 additions & 66 deletions src/components/auth/sign-up/register-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,81 +62,85 @@ export default function RegisterForm() {

return (
<form onSubmit={handleSubmit} className="space-y-8">
<Card className="sm:bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none ">
<Card className="sm:bg-color-6 bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none ">
<CardHeader className="space-y-1">
<CardTitle className="text-2xl">Create Account</CardTitle>
<CardTitle className=" flex justify-center text-2xl">
REGISTER
</CardTitle>
</CardHeader>
<CardContent className="grid gap-4">
<div className="grid gap-2">
<Input
name="name"
placeholder="Name"
type="text"
value={values.name}
onChange={handleChange}
onBlur={handleBlur}
className={cn(
`bg-[url('/assets/auth/user.svg')] ${
errors.name && "border-red-500"
}`
<div className="flex flex-col space-y-4">
<div className="flex flex-col space-y-2">
<Input
name="name"
placeholder="Name"
type="text"
value={values.name}
onChange={handleChange}
onBlur={handleBlur}
className={cn(
`bg-[url('/assets/auth/user.svg')] ${
errors.name && "border-red-500"
}`
)}
/>
{errors.name && (
<p className="text-red-500 text-sm">{errors.name}</p>
)}
/>
{errors.name && (
<p className="text-red-500 text-sm">{errors.name}</p>
)}
</div>
<div className="grid gap-2">
<Input
name="email"
placeholder="Email"
type="email"
value={values.email}
onChange={handleChange}
onBlur={handleBlur}
className={cn(
`bg-[url('/assets/auth/email.svg')] ${
errors.email && "border-red-500"
}`
</div>
<div className="flex flex-col space-y-2">
<Input
name="email"
placeholder="Email"
type="email"
value={values.email}
onChange={handleChange}
onBlur={handleBlur}
className={cn(
`bg-[url('/assets/auth/email.svg')] ${
errors.email && "border-red-500"
}`
)}
/>
{errors.email && (
<p className="text-red-500 text-sm">{errors.email}</p>
)}
/>
{errors.email && (
<p className="text-red-500 text-sm">{errors.email}</p>
)}
</div>
<div className="grid gap-2">
<PasswordInput
name="password"
showPassword={() => setShowPassword((prev) => !prev)}
placeholder="Password"
type={showPassword ? "text" : "password"}
value={values.password}
onChange={handleChange}
onBlur={handleBlur}
className={cn(`${errors.password && "border-red-500"}`)}
/>
{errors.password && (
<p className="text-red-500 text-sm">{errors.password}</p>
)}
</div>
<div className="grid gap-2">
<PasswordInput
name="confirmPassword"
placeholder="Confirm Password"
type={showConfirmPassword ? "text" : "password"}
showPassword={() => setShowConfirmPassword((prev) => !prev)}
value={values.confirmPassword}
onChange={handleChange}
onBlur={handleBlur}
className={cn(`${errors.confirmPassword && "border-red-500"}`)}
/>
{errors.confirmPassword && (
<p className="text-red-500 text-sm">{errors.confirmPassword}</p>
)}
</div>
<div className="flex flex-col space-y-2">
<PasswordInput
name="password"
showPassword={() => setShowPassword((prev) => !prev)}
placeholder="Password"
type={showPassword ? "text" : "password"}
value={values.password}
onChange={handleChange}
onBlur={handleBlur}
className={cn(`${errors.password && "border-red-500"}`)}
/>
{errors.password && (
<p className="text-red-500 text-sm">{errors.password}</p>
)}
</div>
<div className="flex flex-col space-y-2">
<PasswordInput
name="confirmPassword"
placeholder="Confirm Password"
type={showConfirmPassword ? "text" : "password"}
showPassword={() => setShowConfirmPassword((prev) => !prev)}
value={values.confirmPassword}
onChange={handleChange}
onBlur={handleBlur}
className={cn(`${errors.confirmPassword && "border-red-500"}`)}
/>
{errors.confirmPassword && (
<p className="text-red-500 text-sm">{errors.confirmPassword}</p>
)}
</div>
</div>
</CardContent>
<CardFooter className="flex flex-col items-start gap-5">
<Button className="w-full" type="submit" disabled={isSubmitting}>
Create Account
REGISTER
{isSubmitting && <Loader2 className="animate-spin h-4 w-4 ml-2" />}
</Button>
<div className="text-xs text-gray-300 text-center w-full">
Expand Down
2 changes: 1 addition & 1 deletion src/components/learningPath/LearningPathHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const LearningPathHeader = ({
}) => {
return (
<>
<div className="relative h-full min-w-screen max-w-[180rem] ">
<div className="relative h-full min-w-screen max-w-[180rem] mt-2 mx-2 ">
<div
className="absolute inset-0 h-[40rem] bg-left-top -top-20 bg-no-repeat bg-blend-normal -z-10"
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/learningPath/edit/EditForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const EditForm = ({ learningPathData }) => {
className="space-y-2 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none"
onSubmit={handleSubmit}
>
<Card className="sm:bg-color-6 w-full flexy sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<Card className="sm:bg-color-6 bg-color-6 w-full sm:w-96 sm:rounded-2xl rounded-none sm:border-solid border-none">
<CardHeader className="space-y-1">
<Input
name="title"
Expand Down
3 changes: 1 addition & 2 deletions src/components/ui/input-password.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const PasswordInput = React.forwardRef(
<input
type={type}
className={cn(
`flex h-9 pr-12 pl-4 w-full text-color-2 peer placeholder:text-color-2 border-white border-b-2 bg-transparent py-1 text-md shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus:rounded-lg transition-all disabled:cursor-not-allowed disabled:opacity-50`,
className
`flex h-9 pr-12 pl-4 w-full text-color-2 peer placeholder:white border-white border-b-2 bg-transparent py-1 text-md shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus:rounded-lg transition-all disabled:cursor-not-allowed disabled:opacity-50 focus:text-white`
)}
ref={ref}
{...props}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
<input
type={type}
className={cn(
`flex-1 h-9 pr-12 pl-4 md:min-w-[50rem] xl:min-w-[70rem] bg-no-repeat bg-[position:95%] bg-[length:1.5rem] text-white peer placeholder:text-white border-white border-b-2 bg-transparent py-1 text-md shadow-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus:rounded-lg transition-all disabled:cursor-not-allowed disabled:opacity-50`,
`flex-1 h-9 pr-12 pl-4 bg-no-repeat bg-[position:95%] bg-[length:1.5rem] text-white peer placeholder:text-white border-white border-b-2 bg-transparent py-1 text-md shadow-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus:rounded-lg transition-all disabled:cursor-not-allowed disabled:opacity-50`,
className
)}
ref={ref}
Expand Down