-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from BookHive-ufcg/feat/login-signup-style
Login and Signup pages
- Loading branch information
Showing
15 changed files
with
328 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
.container { | ||
padding: 2rem 0; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.leftContainer { | ||
width: 50%; | ||
} | ||
|
||
.leftContent { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.description { | ||
margin-right: 10%; | ||
text-align: right; | ||
color: var(--font-color-secondary); | ||
font-family: var(--font-secondary); | ||
font-size: 1.35rem; | ||
} | ||
|
||
.rightContainer { | ||
width: 50%; | ||
} | ||
|
||
.rightContent { | ||
padding: 0 4rem; | ||
} | ||
|
||
.title { | ||
font-size: 2.2rem; | ||
text-transform: uppercase; | ||
} | ||
|
||
.subTitle { | ||
font-size: 1.2rem; | ||
color: var(--font-color-secondary); | ||
font-family: var(--font-secondary); | ||
} | ||
|
||
.form { | ||
margin: 3rem 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.formGroup { | ||
margin-top: 1rem; | ||
} | ||
|
||
.forgotPassword { | ||
color: var(--font-color-secondary); | ||
text-decoration: none; | ||
font-size: 0.8rem; | ||
margin-left: auto; | ||
font-family: var(--font-secondary); | ||
font-size: 1.1rem; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.button { | ||
margin-top: 1.5rem; | ||
} | ||
|
||
.separator { | ||
display: flex; | ||
align-items: center; | ||
text-align: center; | ||
margin-top: 4rem; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.separator::before, | ||
.separator::after { | ||
content: ""; | ||
flex: 1; | ||
border-bottom: 1px solid var(--color-grey); | ||
} | ||
|
||
.separator span { | ||
padding: 0 10px; | ||
color: var(--color-grey); | ||
font-size: 22px; | ||
font-family: var(--font-secondary); | ||
font-size: 1.4rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,69 @@ | ||
import styles from "./login.module.css"; | ||
|
||
import Input from "@/components/Input"; | ||
import Button from "@/components/Button"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
export default function Login() { | ||
return <main></main>; | ||
return ( | ||
<main> | ||
<div className={styles.container}> | ||
<div className={styles.leftContainer}> | ||
<div className={styles.leftContent}> | ||
<Image | ||
src="/logo.svg" | ||
width={300} | ||
height={200} | ||
alt="Logo" | ||
className={styles.logo} | ||
/> | ||
</div> | ||
|
||
<p className={styles.description}>Join us and find your honeycomb</p> | ||
</div> | ||
|
||
<div className={styles.rightContainer}> | ||
<div className={styles.rightContent}> | ||
<h1 className={styles.title}>Sign in to BookHive</h1> | ||
<p className={styles.subTitle}>Use your username and password</p> | ||
<form className={styles.form}> | ||
<div className={styles.formGroup}> | ||
<Input | ||
type="text" | ||
id="username" | ||
placeholder="Username" | ||
label="Username" | ||
/> | ||
</div> | ||
<div className={styles.formGroup}> | ||
<Input | ||
type="password" | ||
id="password" | ||
placeholder="Password" | ||
label="Password" | ||
/> | ||
</div> | ||
|
||
<a className={styles.forgotPassword} href="#"> | ||
Forgot your password? | ||
</a> | ||
|
||
<Button className={styles.button}>Login</Button> | ||
</form> | ||
|
||
<div className={styles.separator}> | ||
<span>New Here?</span> | ||
</div> | ||
|
||
<Link href="/signup"> | ||
<Button className={styles.button} variant="secondary"> | ||
Sign up | ||
</Button> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Input from "@/components/Input"; | ||
import styles from "./signup.module.css"; | ||
import Button from "@/components/Button"; | ||
|
||
export default function Signup() { | ||
return ( | ||
<main> | ||
<div className={styles.signup}> | ||
<div className={styles.presentation}> | ||
<h1 className={styles.title}> | ||
Signup, | ||
<br /> | ||
Bee a BookHiver! | ||
</h1> | ||
</div> | ||
|
||
<div className={styles.gridContainer}> | ||
<Input type="text" id="firstName" label="First name" /> | ||
<Input type="text" id="lastName" label="Last name" /> | ||
<Input type="date" id="date" label="Date of birth" /> | ||
<Input type="text" id="username" label="Username" /> | ||
<Input type="password" id="password" label="Password" /> | ||
<Button className={styles.button}>Join us</Button> | ||
</div> | ||
</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.signup { | ||
width: 100%; | ||
padding: 4rem; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.presentation { | ||
height: 20vh; | ||
} | ||
|
||
.title { | ||
font-weight: 400; | ||
} | ||
|
||
.gridContainer { | ||
display: grid; | ||
grid-template-columns: auto auto auto; | ||
grid-gap: 2.5rem 4rem; | ||
} | ||
|
||
.button { | ||
height: 4.1rem; | ||
align-self: flex-end; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.button { | ||
width: 100%; | ||
padding: 12px; | ||
font-size: 16px; | ||
border: none; | ||
border-radius: 8px; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.primary { | ||
background-color: #ffd700; | ||
color: #000; | ||
} | ||
|
||
.primary:hover { | ||
background-color: #e6c200; | ||
} | ||
|
||
.secondary { | ||
background-color: #000; | ||
color: #ffd700; | ||
} | ||
|
||
.secondary:hover { | ||
background-color: #333; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { ButtonHTMLAttributes } from "react"; | ||
import styles from "./button.module.css"; | ||
|
||
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & { | ||
variant?: "primary" | "secondary"; | ||
}; | ||
|
||
const Button = ({ | ||
children, | ||
variant = "primary", | ||
className, | ||
...props | ||
}: ButtonProps) => { | ||
const buttonClass = `${styles.button} ${styles[variant]} ${className || ""}`; | ||
|
||
return ( | ||
<button className={buttonClass.trim()} {...props}> | ||
{children} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
} | ||
|
||
.backButtonContainer { | ||
/* same with from Image tag */ | ||
min-width: 40px; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React, { InputHTMLAttributes } from "react"; | ||
import styles from "./input.module.css"; | ||
|
||
type InputProps = InputHTMLAttributes<HTMLInputElement> & { | ||
label: string; | ||
}; | ||
|
||
const Input = ({ label, ...props }: InputProps) => { | ||
return ( | ||
<div> | ||
<label className={styles.label}>{label}</label> | ||
<input className={styles.input} {...props} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
Oops, something went wrong.
040a8da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for bookhive-web ready!
✅ Preview
https://bookhive-kwlsf78vp-amiltoncabrals-projects.vercel.app
Built with commit 040a8da.
This pull request is being automatically deployed with vercel-action