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

Formulários de Login e Cadastro #196

Merged
merged 43 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3cb3ec0
fix: button disabling when agreeing with terms and policy
raiane-oliveira Jan 22, 2024
f49bccd
fix: showing only first character of error message
raiane-oliveira Jan 22, 2024
b738faa
refactor: form style and remove desnecessary states and effects
raiane-oliveira Jan 23, 2024
c80033c
refactor: login form styles and form errors
raiane-oliveira Jan 26, 2024
5d2fc6e
refactor: modal validate email styles
raiane-oliveira Jan 26, 2024
1e29a0c
fix: max width not applying and breaking the mentors section
raiane-oliveira Jan 26, 2024
9280d7d
fix: remove additional margin bottom at checkbox
raiane-oliveira Jan 26, 2024
09dc98f
fix: login page image overflowing the viewport
raiane-oliveira Jan 26, 2024
a4185cb
fix: invalid Eye component props sended
raiane-oliveira Jan 26, 2024
87d7e2d
feat: new colors theme and fix global styles
raiane-oliveira Jan 30, 2024
5e98e28
feat: new header styles
raiane-oliveira Jan 30, 2024
7480dab
feat: breakpoint values
raiane-oliveira Jan 30, 2024
64be47d
feat: new hero section styles
raiane-oliveira Jan 30, 2024
e89ea41
feat: new onboarding and mentors sectionsstyles
raiane-oliveira Jan 31, 2024
7b08b09
feat: new testimonials section styles
raiane-oliveira Jan 31, 2024
a3376e6
feat: new footer styles
raiane-oliveira Jan 31, 2024
74b26bb
fix: search form icon
raiane-oliveira Jan 31, 2024
160e582
refactor: move footer and header to organisms's directory
raiane-oliveira Jan 31, 2024
bcbb3ab
fix: change static to dynamic year on footer
raiane-oliveira Jan 31, 2024
d0ab2c2
fix: styles bug on mentors and faq pages
raiane-oliveira Jan 31, 2024
8650aa5
fix: box shadow of card overflowing slider
raiane-oliveira Jan 31, 2024
ba1e5df
fix: box-shadow of card being hidden in the slider
raiane-oliveira Jan 31, 2024
d07c628
Merge branch 'main' of github.com:raiane-oliveira/mentores-frontend
raiane-oliveira Jan 31, 2024
1af1f5b
fix: component accessing invalid color
raiane-oliveira Jan 31, 2024
e01f7bf
fix: component accessing invalid color
raiane-oliveira Jan 31, 2024
d05f956
fix: invalid component
raiane-oliveira Jan 31, 2024
c11cff0
feat: header responsiveness
raiane-oliveira Feb 2, 2024
b29eda9
feat: hero and onboarding sections responsiveness
raiane-oliveira Feb 2, 2024
7d1d49e
fix: remove outline menu header in links
raiane-oliveira Feb 2, 2024
dbf0f73
fix: hero and onboarding sections behind clickable area
raiane-oliveira Feb 2, 2024
06cbe6b
fix: add button search form into hero section on mobile devices
raiane-oliveira Feb 3, 2024
c77e570
feat: add hover states to button variants
raiane-oliveira Feb 3, 2024
a296828
feat: add responsiveness in mentor and testimonial sections
raiane-oliveira Feb 3, 2024
3095046
fix: decrease max width of card paragraph on mobile devices
raiane-oliveira Feb 3, 2024
71c7965
fix: change breakpoint value of large mobile devices
raiane-oliveira Feb 3, 2024
6f8f174
fix: align sections paddings on medium desktop breakpoint
raiane-oliveira Feb 3, 2024
3599754
fix: invalid bg color in register page and modal cancel button doesn'…
raiane-oliveira Feb 5, 2024
227df48
fix: invalid bg color in login page and new styles
raiane-oliveira Feb 5, 2024
0d341a8
fix: change color and spacing styles of components
raiane-oliveira Feb 6, 2024
37fe874
fix: add floating placeholder to search input mentor in hero section
raiane-oliveira Feb 6, 2024
b6c47fc
fix: increase label font size and colors of input
raiane-oliveira Feb 6, 2024
92ebf23
fix: change placeholder name of input search mentor on desktop screens
raiane-oliveira Feb 6, 2024
bb57c22
fix: change placeholder color on input component
raiane-oliveira Feb 6, 2024
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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"@rocketseat/eslint-config/next"
],
"rules": {
"no-unused-vars": "off"
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"formik": "^2.4.2",
"framer-motion": "^10.13.0",
"next": "13.4.12",
"phosphor-react": "^1.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-easy-crop": "^5.0.2",
"react-fast-marquee": "^1.6.0",
"react-toastify": "^9.1.3",
"styled-components": "^6.0.5",
"swiper": "^10.0.4",
Expand Down
Binary file removed src/assets/homepage/footer/discord.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/face.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/github.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/insta.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/linkedin.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/telegram.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/twitch.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/twitter.webp
Binary file not shown.
Binary file removed src/assets/homepage/footer/youtube.webp
Binary file not shown.
46 changes: 0 additions & 46 deletions src/assets/homepage/onboarding/conecte.svg

This file was deleted.

150 changes: 82 additions & 68 deletions src/assets/homepage/onboarding/descreva.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 70 additions & 51 deletions src/assets/homepage/onboarding/encontre.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 85 additions & 74 deletions src/assets/homepage/onboarding/marque.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 3 additions & 17 deletions src/assets/logos/sou-junior.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 16 additions & 68 deletions src/components/atoms/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,75 +1,23 @@
import { ReactNode } from 'react'
import {
ButtonDefault,
ButtonForm,
ButtonFormVariant,
ButtonModal,
ButtonModalSecondary,
ButtonUnstyled,
ButtonVariant,
} from './style'
import { ComponentType, ElementType, ReactNode } from 'react'
import { ButtonStyle, ButtonStyleProps } from './style'

import Link from 'next/link'
type ElementOrComponentType = ElementType<any> | ComponentType<any>

interface ButtonProps {
content: ReactNode
btnRole?:
| 'primary'
| 'secondary'
| 'unstyled'
| 'modal-secondary'
| 'modal-default'
| 'form'
| 'form-secondary'
disabled?: boolean
onClick?: () => void
interface ButtonProps extends ButtonStyleProps {
children: ReactNode
as?: ElementOrComponentType
[key: string]: any
}

export function Button({
content,
btnRole = 'primary',
disabled = false,
onClick,
children,
variant = 'primary',
size = 'lg',
...props
}: ButtonProps) {
if (btnRole === 'primary') return <ButtonDefault>{content}</ButtonDefault>

if (btnRole === 'secondary')
return <ButtonVariant type="button">{content}</ButtonVariant>

if (btnRole === 'unstyled')
return (
<ButtonUnstyled onClick={onClick} type="button">
{content}
</ButtonUnstyled>
)

if (btnRole === 'modal-secondary')
return (
<ButtonModalSecondary onClick={onClick} type="button">
{content}
</ButtonModalSecondary>
)

if (btnRole === 'modal-default')
return (
<Link href={'/'}>
<ButtonModal type="button">{content}</ButtonModal>
</Link>
)

if (btnRole === 'form-secondary')
return (
<ButtonFormVariant onClick={onClick} type="button">
{content}
</ButtonFormVariant>
)

if (btnRole === 'form')
return (
<ButtonForm type="submit" disabled={disabled}>
{content}
</ButtonForm>
)

return <></>
return (
<ButtonStyle variant={variant} size={size} {...props}>
{children}
</ButtonStyle>
)
}
165 changes: 78 additions & 87 deletions src/components/atoms/Button/style.ts
Original file line number Diff line number Diff line change
@@ -1,97 +1,88 @@
import styled from 'styled-components'
import styled, { css } from 'styled-components'

export const ButtonDefault = styled.button`
font-size: ${(props) => props.theme.fontSizes.sm};
border-color: ${(props) => props.theme.colors.blue[400]};
color: ${(props) => props.theme.colors.white};
background-color: ${(props) => props.theme.colors.blue[400]};
&:hover {
background-color: transparent;
color: ${(props) => props.theme.colors.blue[400]};
}
`

export const ButtonVariant = styled(ButtonDefault)`
border-color: ${(props) => props.theme.colors.blue[400]};
color: ${(props) => props.theme.colors.blue[400]};
background-color: transparent;
&:hover {
background-color: ${(props) => props.theme.colors.blue[400]};
color: ${(props) => props.theme.colors.white};
}
`

export const ButtonForm = styled(ButtonDefault)`
width: 100%;
height: 48px;
background: ${(props) => props.theme.colors.blue[400]};
&:hover {
background-color: ${(props) => props.theme.colors.blue[700]};
color: ${(props) => props.theme.colors.white};
box-shadow: 0px 1px 15px rgba(17, 101, 186, 0.4);
}
&:disabled {
cursor: not-allowed;
filter: grayscale(100%);
}
`
const BaseStylesButton = styled.button`
all: unset;
export const ButtonFormVariant = styled(ButtonForm)`
width: 100%;
border-color: ${(props) => props.theme.colors.blue[400]};
color: ${(props) => props.theme.colors.blue[400]};
background-color: ${(props) => props.theme.colors.white};
`
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
export const ButtonUnstyled = styled.button`
all: unset;
border-radius: 0.5rem;
cursor: pointer;
margin: 0px;
text-decoration: underline;
transition: all 0.3s ease;
&:hover {
color: ${(props) => props.theme.colors.blue[300]};
}
`
export const ButtonModal = styled.button`
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 150%;
color: #fff;
padding: 8px 40px;
border: 2px solid ${(props) => props.theme.colors.red[500]};
background-color: ${(props) => props.theme.colors.red[500]};
font-size: 1rem;
font-weight: 500;
line-height: 0.7;
a {
color: #fff;
width: 100%;
height: 100%;
padding: 8px 40px;
}
transition: 0.3s ease;
&:hover {
color: #5d5f5d;
background-color: transparent;
border-color: #5d5f5d;
}
${(props) => {
if (props.disabled) {
return css`
cursor: not-allowed;
`
}
}}
`

export const ButtonModalSecondary = styled(ButtonModal)`
color: #5d5f5d;
background-color: transparent;
border: 2px solid #5d5f5d;
&:hover {
background-color: ${(props) => props.theme.colors.red[500]};
color: #fff;
border-color: ${(props) => props.theme.colors.red[500]};
}
export interface ButtonStyleProps {
variant?: 'primary' | 'secondary' | 'tertiary'
size?: 'lg' | 'md' | 'sm'
}

export const ButtonStyle = styled(BaseStylesButton)<ButtonStyleProps>`
${({ variant, theme, disabled }) => {
switch (variant) {
case 'primary':
return css`
border: 2px solid
${!disabled ? theme.colors.blue[800] : theme.colors.gray[500]};
background-color: ${!disabled
? theme.colors.blue[800]
: theme.colors.gray[500]};
color: ${theme.colors.white};
&:not(:disabled):hover {
border-color: ${theme.colors.blue[850]};
background-color: ${theme.colors.blue[850]};
}
`
case 'secondary':
return css`
border: 2px solid ${theme.colors.blue[800]};
color: ${theme.colors.blue[800]};
&:not(:disabled):hover {
border-color: ${theme.colors.blue[850]};
color: ${theme.colors.blue[850]};
}
`
case 'tertiary':
return css`
color: ${theme.colors.blue[800]};
&:not(:disabled):hover {
color: ${theme.colors.blue[850]};
}
`
}
}}
${({ size }) => {
switch (size) {
case 'lg':
return css`
padding: 1rem 1.5rem;
`
case 'md':
return css`
padding: 0.75rem 1.5rem;
`
case 'sm':
return css`
padding: 0.5rem 1.5rem;
`
}
}}
`
12 changes: 8 additions & 4 deletions src/components/atoms/CardOnboarding/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import Image from 'next/image'
import { ContainerCard } from './style'
import { ReactNode } from 'react'

interface CardOnboardingProps {
title: string
description: string
children: ReactNode
img: string
}

export function CardOnboarding({
title,
description,
children: description,
img,
}: CardOnboardingProps) {
return (
<ContainerCard>
<Image width={180} height={180} src={img} alt={title} loading="eager" />
<h3>{title}</h3>
<p>{description}</p>

<section>
<h5 className="title">{title}</h5>
<p>{description}</p>
</section>
</ContainerCard>
)
}
Loading