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

Redesigned the SignIn and SignUp Pages for Sellor | Issue #474 #485

Merged
Merged
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
71 changes: 28 additions & 43 deletions scruter-nextjs/app/(routes)/auth/seller/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Metadata } from 'next';
import Image from 'next/image';
import Link from 'next/link';

import { cn } from '@/lib/utils';
import { buttonVariants } from '@/components/ui/button';
import { SellerLoginForm } from '../../components/seller/login-form';

export const metadata: Metadata = {
Expand All @@ -14,47 +11,35 @@ export const metadata: Metadata = {
export default function AuthenticationPage() {
return (
<>
<div className="sm:hidden">
<Image
src="/signupPattern.svg"
width={1280}
height={843}
alt="Authentication"
className="block dark:hidden"
/>
<Image
src="/signupPattern.svg"
width={1280}
height={843}
alt="Authentication"
className="hidden dark:block"
/>
</div>
<div className="container relative hidden h-[700px] flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0">
<Link
href="/auth/seller/signup"
className={cn(
buttonVariants({ variant: 'ghost' }),
'absolute right-4 top-4 md:right-8 md:top-8 bg-black text-white'
)}
>
Signup
</Link>

<div
className={`hidden bg-[url("/signupPattern.svg")] bg-opacity-50 h-full flex-col p-10 text-white dark:border-r lg:flex`}
></div>
<div className="lg:p-8">
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div className="flex flex-col space-y-2 text-center">
<h1 className="text-2xl font-semibold tracking-tight">
Welcome back dear Seller!
</h1>
<p className="text-sm text-muted-foreground">
Enter your email below to Log into your account
</p>
</div>
<div className="min-h-screen flex items-center justify-center bg-gray-300">
<div className="w-full max-w-4xl grid grid-cols-1 md:grid-cols-2 bg-white shadow-lg rounded-lg overflow-hidden transform transition duration-500 ease-in-out hover:scale-105">
<div className="p-8 md:p-10 flex flex-col justify-center bg-white">
<h2 className="text-3xl font-semibold text-center text-blue-700 mb-3">
Welcome back, dear Seller!
</h2>
<p className="text-center text-gray-600 mb-6">
Enter your email below to log into your account.
</p>
<SellerLoginForm authType="login" />
<div className="text-center mt-4 space-y-2 flex flex-col">
<p>Don’t have an account?</p>
<Link
href="/auth/seller/signup"
className="text-sm text-green-500 hover:underline"
>
Sign up as a seller
</Link>
</div>
</div>
<div className="hidden md:flex items-center justify-center bg-blue-50">
<Image
src="/signupPattern.svg"
alt="Authentication"
layout="responsive"
width={350}
height={350}
className="rounded-lg"
/>
</div>
</div>
</div>
Expand Down
88 changes: 36 additions & 52 deletions scruter-nextjs/app/(routes)/auth/seller/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Metadata } from 'next';
import Image from 'next/image';
import Link from 'next/link';

import { cn } from '@/lib/utils';
import { buttonVariants } from '@/components/ui/button';
import { SellerSignupForm } from '../../components/seller/signup-form';

export const metadata: Metadata = {
Expand All @@ -14,56 +11,28 @@ export const metadata: Metadata = {
export default function AuthenticationPage() {
return (
<>
<div className="md:hidden">
<Image
src="/signupPattern.svg"
width={1280}
height={843}
alt="Authentication"
className="block dark:hidden"
/>
<Image
src="/signupPattern.svg"
width={1280}
height={843}
alt="Authentication"
className="hidden dark:block"
/>
</div>
<div className="container relative hidden h-[700px] flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0">
<Link
href="/auth/user/signup"
className={cn(
buttonVariants({ variant: 'ghost' }),
'absolute right-32 top-8 md:right-32 md:top-8 bg-black text-white'
)}
>
Join Scruter as a user
</Link>
<Link
href="/auth/seller/login"
className={cn(
buttonVariants({ variant: 'ghost' }),
'absolute right-4 top-4 md:right-8 md:top-8 bg-black text-white'
)}
>
Login
</Link>
<div
className={`hidden bg-[url("/signupPattern.svg")] bg-opacity-50 h-full flex-col p-10 text-white dark:border-r lg:flex`}
></div>
<div className="lg:p-8">
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div className="flex flex-col space-y-2 text-center">
<h1 className="text-2xl font-semibold tracking-tight">
Create an account
</h1>
<p className="text-sm text-muted-foreground">
Enter your email below to create your account
</p>
</div>
<div className="min-h-screen flex items-center justify-center bg-gray-300">
<div className="w-full max-w-4xl grid grid-cols-1 md:grid-cols-2 bg-white shadow-lg rounded-lg overflow-hidden transform transition duration-500 ease-in-out hover:scale-105">
<div className="hidden md:flex items-center justify-center bg-blue-50 order-1 md:order-1">
<Image
src="/signupPattern.svg"
alt="Authentication"
layout="responsive"
width={350}
height={350}
className="rounded-lg"
/>
</div>
<div className="p-8 md:p-10 flex flex-col justify-center bg-white order-2 md:order-2">
<h2 className="text-3xl font-semibold text-center text-blue-700 mb-3">
Create an account
</h2>
<p className="text-center text-gray-600 mb-6">
Enter your email below to create your account.
</p>
<SellerSignupForm authType="signup" />
<p className="px-8 text-center text-sm text-muted-foreground">

<p className="px-8 text-center text-sm text-muted-foreground mt-4">
By clicking continue, you agree to our{' '}
<Link
href="/terms"
Expand All @@ -80,6 +49,21 @@ export default function AuthenticationPage() {
</Link>
.
</p>
<div className="text-center mt-4 space-y-2 flex flex-col">
<p>Already have an account?</p>
<Link
href="/auth/seller/login"
className="text-sm text-blue-600 hover:underline"
>
Login
</Link>
<Link
href="/auth/user/signup"
className="text-sm text-green-500 hover:underline"
>
Join Scruter as a user
</Link>
</div>
</div>
</div>
</div>
Expand Down