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

266: Add Background image to Forget Password Page #267

Merged
merged 1 commit into from
Jan 9, 2025
Merged
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
Add Background image to Forget Password Page
  • Loading branch information
SUJAY-HK committed Jan 9, 2025
commit 838002d5a763a791f1a89947dbe28d79439fcb5b
61 changes: 36 additions & 25 deletions src/Pages/ForgetPassword.js
Original file line number Diff line number Diff line change
@@ -2,12 +2,21 @@ import React, { useState } from "react";
import styled from "styled-components";
import { motion } from "framer-motion";

const Background = styled.section`
background-image: url("https://img.freepik.com/free-photo/hot-latte-art-coffee-cup-wood-table-coffee-shop_1150-8937.jpg");
background-size: cover;
background-position: center;
height: 100vh;
`;

const ForgetPasswordContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f5f5;
padding: 0 1rem;
backdrop-filter: blur(8px);
background: rgba(0, 0, 0, 0.6);
`;

const ForgetPasswordForm = styled(motion.form)`
@@ -68,31 +77,33 @@ function ForgetPassword() {
};

return (
<ForgetPasswordContainer>
<ForgetPasswordForm
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
onSubmit={handleSubmit}
>
<h2>Forgot Password</h2>
<Input
type="email"
placeholder="Enter your registered email"
value={email}
onChange={(e) => setEmail(e.target.value)}
required
/>
<Button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
type="submit"
<Background>
<ForgetPasswordContainer>
<ForgetPasswordForm
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
onSubmit={handleSubmit}
>
Send Credentials
</Button>
{message && <Message success={isValid}>{message}</Message>}
</ForgetPasswordForm>
</ForgetPasswordContainer>
<h2>Forgot Password</h2>
<Input
type="email"
placeholder="Enter your registered email"
value={email}
onChange={(e) => setEmail(e.target.value)}
required
/>
<Button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
type="submit"
>
Send Credentials
</Button>
{message && <Message success={isValid}>{message}</Message>}
</ForgetPasswordForm>
</ForgetPasswordContainer>
</Background>
);
}

Loading
Oops, something went wrong.