Skip to content

Commit

Permalink
Merge pull request #3 from Fingertips18/development
Browse files Browse the repository at this point in the history
Separate auth title into its own file and add gradient with pulse animation
  • Loading branch information
Fingertips18 authored Sep 23, 2024
2 parents 4007d4a + 679317b commit 1eb1b03
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 35 deletions.
27 changes: 27 additions & 0 deletions client/src/components/auth-title.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
interface AuthTitleProps {
title: string;
body?: string;
}

const AuthTitle = ({ title, body }: AuthTitleProps) => {
return (
<div className="w-full rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl">
<h2
className="text-lg lg:text-2xl font-extrabold text-center uppercase
bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent
drop-shadow-primary-glow animate-pulse p-4"
>
{title}
</h2>
{body && (
<div className="w-full bg-primary/25 p-2.5 flex-center border-t border-primary/50">
<p className="text-xs lg:text-base text-center lg:max-w-[324px] text-foreground/60 font-medium">
{body}
</p>
</div>
)}
</div>
);
};

export { AuthTitle };
16 changes: 5 additions & 11 deletions client/src/pages/forgot-password/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
import { SwitchAuth } from "@/components/switch-auth";
import { ForgotPasswordForm } from "./_components/forgot-password-form";
import { AppRoutes } from "@/constants/routes";
import { AuthTitle } from "@/components/auth-title";

const ForgotPasswordPage = () => {
return (
<section className="px-4 lg:px-0 h-full flex-center flex-col gap-y-6 w-fit mx-auto">
<div className="w-full rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl">
<h2 className="text-lg lg:text-2xl font-extrabold text-center uppercase pt-4 pb-2">
Forgot Password
</h2>
<div className="w-full bg-primary/25 p-2.5 flex-center border-t border-primary/50">
<p className="text-xs lg:text-base text-center lg:max-w-[324px] text-foreground/60 font-medium">
Enter your email address and wait for a reset password link to be
sent.
</p>
</div>
</div>
<AuthTitle
title="Forgot Password"
body="Enter your email address and wait for a reset password link to be sent."
/>

<ForgotPasswordForm />

Expand Down
8 changes: 2 additions & 6 deletions client/src/pages/reset-password/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { SwitchAuth } from "@/components/switch-auth";
import { AuthTitle } from "@/components/auth-title";
import { AppRoutes } from "@/constants/routes";

import { ResetPasswordForm } from "./_components/reset-password-form";

const ResetPasswordPage = () => {
return (
<section className="px-4 lg:px-0 h-full flex-center flex-col gap-y-6 w-fit mx-auto">
<h2
className="text-lg lg:text-2xl font-extrabold text-center uppercase w-full
rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl p-4"
>
Reset Password
</h2>
<AuthTitle title="Reset Password" />

<ResetPasswordForm />

Expand Down
8 changes: 2 additions & 6 deletions client/src/pages/sign-in/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchAuth } from "@/components/switch-auth";
import { AuthTitle } from "@/components/auth-title";
import { AppRoutes } from "@/constants/routes";
import { Or } from "@/components/or";

Expand All @@ -7,12 +8,7 @@ import { SignInForm } from "./_components/sign-in-form";
const SignInPage = () => {
return (
<section className="px-4 lg:px-0 h-full flex-center flex-col gap-y-6 w-fit mx-auto">
<h2
className="text-lg lg:text-2xl font-extrabold text-center uppercase w-full
rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl p-4"
>
Access Your Account
</h2>
<AuthTitle title="Access Your Account" />

<SignInForm />

Expand Down
8 changes: 2 additions & 6 deletions client/src/pages/sign-up/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchAuth } from "@/components/switch-auth";
import { AuthTitle } from "@/components/auth-title";
import { AppRoutes } from "@/constants/routes";
import { Or } from "@/components/or";

Expand All @@ -7,12 +8,7 @@ import { SignUpForm } from "./_components/sign-up-form";
const SignUpPage = () => {
return (
<section className="px-4 lg:px-0 h-full flex-center flex-col gap-y-6 w-fit mx-auto">
<h2
className="text-lg lg:text-2xl font-extrabold text-center uppercase w-full
rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl p-4"
>
Create Account
</h2>
<AuthTitle title="Create Account" />

<SignUpForm />

Expand Down
9 changes: 3 additions & 6 deletions client/src/pages/verify-email/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { AuthTitle } from "@/components/auth-title";

import { VerifyEmailForm } from "./_components/verify-email-form";
import { ResendCode } from "./_components/resend-code";

const VerifyEmailPage = () => {
return (
<section className="px-4 lg:px-0 h-full flex-center flex-col gap-y-6 w-fit mx-auto">
<h2
className="text-lg lg:text-2xl font-extrabold text-center uppercase w-full
rounded-md border border-primary/50 bg-primary/15 drop-shadow-2xl p-4"
>
Verify Email
</h2>
<AuthTitle title="Verify Email" />

<VerifyEmailForm />

Expand Down

0 comments on commit 1eb1b03

Please sign in to comment.