feature/institucionalReact #1
23
.gitignore
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
99
README.md
@ -1,93 +1,46 @@
|
||||
# Desafio REACT e Typescript
|
||||
# Getting Started with Create React App
|
||||
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
## Getting started
|
||||
In the project directory, you can run:
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
### `npm start`
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
## Add your files
|
||||
The page will reload if you make edits.\
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
- [ ] [Create](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
### `npm test`
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
## Integrate with your tools
|
||||
### `npm run build`
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript/-/settings/integrations)
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
## Collaborate with your team
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
## Test and Deploy
|
||||
### `npm run eject`
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
***
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
# Editing this README
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://www.makeareadme.com/) for this template.
|
||||
## Learn More
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
93
README.old.md
Normal file
@ -0,0 +1,93 @@
|
||||
# Desafio REACT e Typescript
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
|
29726
package-lock.json
generated
Normal file
56
package.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "desafio-react-e-typescript-patrick-reis-santos",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^16.18.11",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"date-fns": "^2.29.3",
|
||||
"formik": "^2.2.9",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-headless-accordion": "^1.0.2",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-router-dom": "^6.7.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"sass": "^1.57.1",
|
||||
"scss": "^0.2.4",
|
||||
"typescript": "^4.9.4",
|
||||
"validations-br": "^1.3.0",
|
||||
"web-vitals": "^2.1.4",
|
||||
"yup": "^0.32.11",
|
||||
"yup-phone": "^1.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-modal": "^3.13.1"
|
||||
}
|
||||
}
|
43
public/index.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
BIN
src/components/floating-buttons/assets/arrowtop.png
Normal file
After Width: | Height: | Size: 738 B |
BIN
src/components/floating-buttons/assets/whatsapp.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
45
src/components/floating-buttons/floating-buttons.module.scss
Normal file
@ -0,0 +1,45 @@
|
||||
.buttonsContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
bottom: 189px;
|
||||
right: 16px;
|
||||
gap: 5px;
|
||||
|
||||
@media (max-width: 375px) {
|
||||
bottom: 29px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
bottom: 51px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
bottom: 229px;
|
||||
}
|
||||
|
||||
.wppLink {
|
||||
cursor: pointer;
|
||||
height: 34px;
|
||||
& img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 66px;
|
||||
}
|
||||
}
|
||||
.topButton {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
|
||||
& img {
|
||||
@media (min-width: 2500px) {
|
||||
height: 66px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
src/components/floating-buttons/floating-buttons.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import wpp from "./assets/whatsapp.png";
|
||||
import arrowtop from "./assets/arrowtop.png";
|
||||
|
||||
import style from "./floating-buttons.module.scss";
|
||||
|
||||
export function FloatingButtons() {
|
||||
function scrollToTop() {
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
}
|
||||
return (
|
||||
<div className={style.buttonsContainer}>
|
||||
<a className={style.wppLink} href="https://wa.me/5532998305110">
|
||||
{" "}
|
||||
<img src={wpp} alt=""></img>
|
||||
</a>
|
||||
<button className={style.topButton} onClick={scrollToTop}>
|
||||
{" "}
|
||||
<img src={arrowtop} alt="" />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
BIN
src/components/footer/assets/Boleto.png
Normal file
After Width: | Height: | Size: 821 B |
BIN
src/components/footer/assets/Diners.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/components/footer/assets/Elo.png
Normal file
After Width: | Height: | Size: 880 B |
BIN
src/components/footer/assets/Hiper.png
Normal file
After Width: | Height: | Size: 748 B |
BIN
src/components/footer/assets/Line.png
Normal file
After Width: | Height: | Size: 140 B |
BIN
src/components/footer/assets/Master.png
Normal file
After Width: | Height: | Size: 735 B |
BIN
src/components/footer/assets/Pagseguro.png
Normal file
After Width: | Height: | Size: 886 B |
BIN
src/components/footer/assets/Visa.png
Normal file
After Width: | Height: | Size: 1000 B |
BIN
src/components/footer/assets/assets-info-agencia/facebook.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/components/footer/assets/assets-info-agencia/instagram.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/components/footer/assets/assets-info-agencia/linkedin.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/components/footer/assets/assets-info-agencia/twitter.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/components/footer/assets/assets-info-agencia/youtube.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/components/footer/assets/m3.png
Normal file
After Width: | Height: | Size: 446 B |
BIN
src/components/footer/assets/vtex-pci.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/components/footer/assets/vtex.png
Normal file
After Width: | Height: | Size: 550 B |
125
src/components/footer/footer.module.scss
Normal file
@ -0,0 +1,125 @@
|
||||
.footer {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
background: #000000;
|
||||
|
||||
@media (max-width: 375px) {
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
@media (min-width: 376px) and (max-width: 1150px) {
|
||||
height: 134px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 96px;
|
||||
}
|
||||
.footerMainContainer {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
||||
.footerContainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 100px 0 100px;
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1150px) {
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
align-items: flex-start;
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.footerSpanContainer {
|
||||
display: flex;
|
||||
width: 234px;
|
||||
height: 24px;
|
||||
align-items: center;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
color: #ffffff;
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1150px) {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 20px;
|
||||
width: 467px;
|
||||
height: 47px;
|
||||
}
|
||||
}
|
||||
|
||||
.footerCardIconsContainer {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@media (max-width: 375px) {
|
||||
gap: 11px;
|
||||
}
|
||||
|
||||
.Pci {
|
||||
@media (min-width: 280px) and (max-width: 1150px) {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 66px;
|
||||
}
|
||||
}
|
||||
& img {
|
||||
@media (min-width: 280px) and (max-width: 1150px) {
|
||||
height: 17px;
|
||||
}
|
||||
@media (max-width: 360px) {
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.PdDbContainer {
|
||||
display: flex;
|
||||
gap: 13px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
color: #ffffff;
|
||||
align-items: center;
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1150px) {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
& span {
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
& img {
|
||||
@media (min-width: 2500px) {
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
56
src/components/footer/footer.tsx
Normal file
@ -0,0 +1,56 @@
|
||||
import style from "./footer.module.scss";
|
||||
|
||||
import { InfoAgencia } from "./info-agencia/info-agencia";
|
||||
import { Newsletter } from "../newsletter/newsletter";
|
||||
import { InfoAgenciaMobile } from "./info-agencia-mobile/info-agencia-mobile";
|
||||
|
||||
import boleto from "./assets/Boleto.png";
|
||||
import diners from "./assets/Diners.png";
|
||||
import elo from "./assets/Elo.png";
|
||||
import hiper from "./assets/Hiper.png";
|
||||
import m3 from "./assets/m3.png";
|
||||
import master from "./assets/Master.png";
|
||||
import pagseguro from "./assets/Pagseguro.png";
|
||||
import visa from "./assets/Visa.png";
|
||||
import vtexPci from "./assets/vtex-pci.png";
|
||||
import vtex from "./assets/vtex.png";
|
||||
import line from "./assets/Line.png";
|
||||
|
||||
export function Footer() {
|
||||
return (
|
||||
<>
|
||||
<Newsletter />
|
||||
<InfoAgencia />
|
||||
<InfoAgenciaMobile />
|
||||
<div className={style.footer}>
|
||||
<div className={style.footerMainContainer}>
|
||||
<div className={style.footerContainer}>
|
||||
<div className={style.footerSpanContainer}>
|
||||
<span>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
||||
eiusmod tempor
|
||||
</span>
|
||||
</div>
|
||||
<div className={style.footerCardIconsContainer}>
|
||||
<img src={master} alt="" />
|
||||
<img src={visa} alt="" />
|
||||
<img src={diners} alt="" />
|
||||
<img src={elo} alt="" />
|
||||
<img src={hiper} alt="" />
|
||||
<img src={pagseguro} alt="" />
|
||||
<img src={boleto} alt="" />
|
||||
<img src={line} alt="" />
|
||||
<img src={vtexPci} className={style.Pci} alt="" />
|
||||
</div>
|
||||
<div className={style.PdDbContainer}>
|
||||
<span>Powered By</span>
|
||||
<img src={vtex} alt="" />
|
||||
<span>Developed By</span>
|
||||
<img src={m3} alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
BIN
src/components/footer/info-agencia-mobile/assets/plus.png
Normal file
After Width: | Height: | Size: 178 B |
@ -0,0 +1,60 @@
|
||||
.accordion {
|
||||
display: flex;
|
||||
margin: 24px 16px;
|
||||
gap: 12px;
|
||||
flex-direction: column;
|
||||
@media (min-width: 1151px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.accordionContainer {
|
||||
background-color: #ffffff;
|
||||
border: none;
|
||||
padding: 0;
|
||||
.accordionDiv {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
& img {
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #303030;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.socialIconsMobile {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
& img {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
& span {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #303030;
|
||||
}
|
||||
}
|
||||
.accordionLi {
|
||||
.institucionalInfosMobileUnderline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
& li {
|
||||
list-style: none;
|
||||
margin: 12px 0 12px 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
import style from "./info-agencia-mobile.module.scss";
|
||||
import plus from "./assets/plus.png";
|
||||
import facebook from "../assets/assets-info-agencia/facebook.png";
|
||||
import instagram from "../assets/assets-info-agencia/instagram.png";
|
||||
import twitter from "../assets/assets-info-agencia/twitter.png";
|
||||
import linkedin from "../assets/assets-info-agencia/linkedin.png";
|
||||
import youtube from "../assets/assets-info-agencia/youtube.png";
|
||||
|
||||
import {
|
||||
Accordion,
|
||||
AccordionBody,
|
||||
AccordionHeader,
|
||||
AccordionItem,
|
||||
} from "react-headless-accordion";
|
||||
|
||||
export const InfoAgenciaMobile = () => {
|
||||
return (
|
||||
<Accordion className={style.accordion}>
|
||||
<AccordionItem>
|
||||
<AccordionHeader className={style.accordionContainer}>
|
||||
<div className={style.accordionDiv}>
|
||||
<span>Institucional</span>
|
||||
<img className={style.plusImg} src={plus} alt="" />
|
||||
</div>
|
||||
</AccordionHeader>
|
||||
<AccordionBody>
|
||||
<div className={style.accordionLi}>
|
||||
<li>Quem somos</li>
|
||||
<li>Política de Privacidade</li>
|
||||
<li>Segurança</li>
|
||||
<li className={style.institucionalInfosMobileUnderline}>
|
||||
Seja um Revendedor
|
||||
</li>
|
||||
</div>
|
||||
</AccordionBody>
|
||||
</AccordionItem>
|
||||
|
||||
<AccordionItem>
|
||||
<AccordionHeader className={style.accordionContainer}>
|
||||
<div className={style.accordionDiv}>
|
||||
<span>Dúvidas</span>
|
||||
<img className={style.plusImg} src={plus} alt="" />
|
||||
</div>
|
||||
</AccordionHeader>
|
||||
|
||||
<AccordionBody>
|
||||
<div className={style.accordionLi}>
|
||||
<li>Entrega</li>
|
||||
<li>Pagamento</li>
|
||||
<li>Trocas e Devoluções</li>
|
||||
<li className={style.institucionalInfosMobileUnderline}>
|
||||
Dúvidas Frequentes
|
||||
</li>
|
||||
</div>
|
||||
</AccordionBody>
|
||||
</AccordionItem>
|
||||
<AccordionItem>
|
||||
<AccordionHeader className={style.accordionContainer}>
|
||||
<div className={style.accordionDiv}>
|
||||
<span>Fale conosco</span>
|
||||
<img className={style.plusImg} src={plus} alt="" />
|
||||
</div>
|
||||
</AccordionHeader>
|
||||
|
||||
<AccordionBody>
|
||||
<div className={style.accordionLi}>
|
||||
<li>Atendimento ao Consumidor</li>
|
||||
<li>(11) 4159-9504</li>
|
||||
<li>Atendimento Online</li>
|
||||
<li className={style.institucionalInfosMobileUnderline}>
|
||||
(11) 99433-8825
|
||||
</li>
|
||||
</div>
|
||||
</AccordionBody>
|
||||
</AccordionItem>
|
||||
<div className={style.socialIconsMobile}>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img src={facebook} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img src={instagram} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img src={twitter} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img src={youtube} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img src={linkedin} alt=""></img>
|
||||
</a>
|
||||
</div>
|
||||
<span>www.loremipsum.com</span>
|
||||
</Accordion>
|
||||
);
|
||||
};
|
100
src/components/footer/info-agencia/info-agencia.module.scss
Normal file
@ -0,0 +1,100 @@
|
||||
.infoAgencia {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@media (max-width: 1150px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.infoAgenciaContainer {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
||||
.infoAgenciaMainContainer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 50px 100px;
|
||||
height: 139px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 197px;
|
||||
}
|
||||
|
||||
.institucionalInfosContainer {
|
||||
width: 703px;
|
||||
display: flex;
|
||||
gap: 121px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
gap: 293px;
|
||||
width: 1531px;
|
||||
}
|
||||
|
||||
.institucionalInfosUl {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
width: 155px;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #303030;
|
||||
|
||||
.institucionalInfosUnderline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 24px;
|
||||
width: 315px;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
.infoAgenciaName {
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #303030;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.socialMedia {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #303030;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.socialMediaIconsContainer {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
|
||||
.socialIcons {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
73
src/components/footer/info-agencia/info-agencia.tsx
Normal file
@ -0,0 +1,73 @@
|
||||
import style from "./info-agencia.module.scss";
|
||||
|
||||
import facebook from "../assets/assets-info-agencia/facebook.png";
|
||||
import instagram from "../assets/assets-info-agencia/instagram.png";
|
||||
import twitter from "../assets/assets-info-agencia/twitter.png";
|
||||
import linkedin from "../assets/assets-info-agencia/linkedin.png";
|
||||
import youtube from "../assets/assets-info-agencia/youtube.png";
|
||||
|
||||
export function InfoAgencia() {
|
||||
return (
|
||||
<div className={style.infoAgencia}>
|
||||
<div className={style.infoAgenciaContainer}>
|
||||
<div className={style.infoAgenciaMainContainer}>
|
||||
<div className={style.institucionalInfosContainer}>
|
||||
<ul className={style.institucionalInfosUl}>
|
||||
<li className={style.infoAgenciaName}>INSTITUCIONAL</li>
|
||||
<li>Quem somos</li>
|
||||
<li>Política de Privacidade</li>
|
||||
<li>Segurança</li>
|
||||
<li className={style.institucionalInfosUnderline}>
|
||||
Seja um Revendedor
|
||||
</li>
|
||||
</ul>
|
||||
<ul className={style.institucionalInfosUl}>
|
||||
<li className={style.infoAgenciaName}>DÚVIDAS</li>
|
||||
<li>Entrega</li>
|
||||
<li>Pagamento</li>
|
||||
<li>Trocas e Devoluções</li>
|
||||
<li className={style.institucionalInfosUnderline}>
|
||||
{" "}
|
||||
Dúvidas Frequentes
|
||||
</li>
|
||||
</ul>
|
||||
<ul className={style.institucionalInfosUl}>
|
||||
<li className={style.infoAgenciaName}>FALE CONOSCO</li>
|
||||
<li>Atendimento ao Consumidor</li>
|
||||
<li>(11) 4159-9504</li>
|
||||
<li>Atendimento Online</li>
|
||||
<li className={style.institucionalInfosUnderline}>
|
||||
(11) 99433-8825
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className={style.socialMedia}>
|
||||
<div className={style.socialMediaIconsContainer}>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img className={style.socialIcons} src={facebook} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img className={style.socialIcons} src={instagram} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img className={style.socialIcons} src={twitter} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img className={style.socialIcons} src={youtube} alt=""></img>
|
||||
</a>
|
||||
<a href="https://www.google.com.br/">
|
||||
{" "}
|
||||
<img className={style.socialIcons} src={linkedin} alt=""></img>
|
||||
</a>
|
||||
</div>
|
||||
<span>www.loremipsum.com</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
105
src/components/footer/newsletter/newsletter.module.scss
Normal file
@ -0,0 +1,105 @@
|
||||
.newsLetter {
|
||||
height: 102px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
border-style: solid;
|
||||
border-width: 1px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
height: 182px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 141px;
|
||||
}
|
||||
|
||||
.newsLetterContainer button:active {
|
||||
filter: brightness(80%);
|
||||
}
|
||||
.newsLetterContainer {
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
& h2 {
|
||||
margin: 0 0 8px 0;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #303030;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& input {
|
||||
width: 340px;
|
||||
height: 42px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 4px;
|
||||
padding-left: 16px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
color: #c4c4c4;
|
||||
font-weight: 400;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 668px;
|
||||
height: 59px;
|
||||
font-size: 28px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
& button {
|
||||
width: 126px;
|
||||
height: 42px;
|
||||
background: #000000;
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 4px;
|
||||
color: #ffffff;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.05em;
|
||||
margin-left: 8px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 246px;
|
||||
height: 69px;
|
||||
font-size: 24px;
|
||||
}
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
height: 50px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
src/components/footer/newsletter/newsletter.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import style from "./newsletter.module.scss";
|
||||
export function Newsletter() {
|
||||
return (
|
||||
<div className={style.newsLetter}>
|
||||
<div className={style.newsLetterContainer}>
|
||||
<h2>ASSINE NOSSA NEWSLETTER</h2>
|
||||
<input type="text" placeholder="E-mail" />
|
||||
<button>ENVIAR</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
BIN
src/components/header/assets/cart1.png
Normal file
After Width: | Height: | Size: 448 B |
BIN
src/components/header/assets/close.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
src/components/header/assets/logo.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
src/components/header/assets/lupa.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
src/components/header/assets/menu.png
Normal file
After Width: | Height: | Size: 217 B |
@ -0,0 +1,49 @@
|
||||
.headerHamburger {
|
||||
height: 139px;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
display: none;
|
||||
}
|
||||
.headerHamburgerTop {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 25px 16px 30px 16px;
|
||||
|
||||
.btnModal {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.headerHamburgerPlaceholder {
|
||||
position: relative;
|
||||
padding: 0 16px 0 16px;
|
||||
|
||||
.lupaIcon {
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
top: 9px;
|
||||
}
|
||||
|
||||
& input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border: 2px solid #f0f0f0;
|
||||
border-radius: 5px;
|
||||
height: 36px;
|
||||
padding: 10px 16px;
|
||||
|
||||
&::placeholder {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
src/components/header/header-hamburger/header-hamburger.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
import style from "./header-hamburger.module.scss";
|
||||
import menu from "../assets/menu.png";
|
||||
import m3logo from "../assets/logo.png";
|
||||
import cart from "../assets/cart1.png";
|
||||
import lupa from "../assets/lupa.png";
|
||||
import React from "react";
|
||||
|
||||
interface HamburgerProps {
|
||||
openModal: () => void;
|
||||
}
|
||||
|
||||
export function HeaderHamburger({ openModal }: HamburgerProps) {
|
||||
return (
|
||||
<div className={style.headerHamburger}>
|
||||
<div className={style.headerHamburgerTop}>
|
||||
<button onClick={openModal} className={style.btnModal}>
|
||||
{" "}
|
||||
<img src={menu} alt="" />
|
||||
</button>
|
||||
<img src={m3logo} alt="" />
|
||||
<img src={cart} alt="" />
|
||||
</div>
|
||||
<div className={style.headerHamburgerPlaceholder}>
|
||||
<input type="text" placeholder="Buscar..." />
|
||||
<img className={style.lupaIcon} src={lupa} alt=""></img>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
.menuModal {
|
||||
background: white;
|
||||
width: 100%;
|
||||
height: 585px;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.modalOverlay {
|
||||
background: rgba(69, 69, 69, 0.7);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding-right: 36px;
|
||||
}
|
||||
.modalOpen {
|
||||
height: 78px;
|
||||
background: #000000;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 16px;
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
margin: 31px 16px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #c4c4c4;
|
||||
}
|
31
src/components/header/header-hamburger/menu-aberto.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import React from "react";
|
||||
import Modal from "react-modal";
|
||||
import style from "./menu-aberto.module.scss";
|
||||
import close from "../assets/close.png";
|
||||
|
||||
interface MenuHamburgerProps {
|
||||
isOpen: boolean;
|
||||
onRequestClose: () => void;
|
||||
}
|
||||
|
||||
export function MenuAberto({ isOpen, onRequestClose }: MenuHamburgerProps) {
|
||||
return (
|
||||
<Modal
|
||||
isOpen={isOpen}
|
||||
onRequestClose={onRequestClose}
|
||||
overlayClassName={style.modalOverlay}
|
||||
className={style.menuModal}
|
||||
ariaHideApp={false}
|
||||
>
|
||||
<div className={style.modalOpen}>
|
||||
<span>ENTRAR</span>
|
||||
<img src={close} alt="" />
|
||||
</div>
|
||||
<div className={style.menu}>
|
||||
<span>CURSOS</span>
|
||||
<span>SAIBA MAIS</span>
|
||||
<span>INSTITUCIONAL</span>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
36
src/components/header/header-menu/header-menu.module.scss
Normal file
@ -0,0 +1,36 @@
|
||||
.headerMenu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
height: 44px;
|
||||
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 61px;
|
||||
}
|
||||
.headerMenuContainer {
|
||||
display: flex;
|
||||
margin-left: 100px;
|
||||
gap: 55px;
|
||||
|
||||
& a {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
text-transform: uppercase;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
src/components/header/header-menu/header-menu.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import style from "./header-menu.module.scss";
|
||||
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
|
||||
|
||||
export function HeaderMenu() {
|
||||
return (
|
||||
<Router>
|
||||
<div className={style.headerMenu}>
|
||||
<div className={style.headerMenuContainer}>
|
||||
<Link to="/cursos"> CURSOS</Link>
|
||||
<Link to="/saiba-mais"> SAIBA MAIS</Link>
|
||||
<Link to="/institucionais"> INSTITUCIONAIS</Link>
|
||||
</div>
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
}
|
BIN
src/components/header/header-route/assets/arrow.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
src/components/header/header-route/assets/home.png
Normal file
After Width: | Height: | Size: 480 B |
44
src/components/header/header-route/header-route.module.scss
Normal file
@ -0,0 +1,44 @@
|
||||
.headerRoute {
|
||||
height: 125px;
|
||||
|
||||
.headerRouteContainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30px 100px;
|
||||
gap: 10px;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
margin: 30px 16px;
|
||||
}
|
||||
|
||||
.home {
|
||||
height: 16px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 31px;
|
||||
}
|
||||
}
|
||||
|
||||
& img {
|
||||
height: 8px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #c4c4c4;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
src/components/header/header-route/header-route.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import style from "./header-route.module.scss";
|
||||
|
||||
import home from "./assets/home.png";
|
||||
import arrow from "./assets/arrow.png";
|
||||
|
||||
export function HeaderRoute() {
|
||||
return (
|
||||
<div className={style.headerRoute}>
|
||||
<div className={style.headerRouteContainer}>
|
||||
<img className={style.home} src={home} alt="" />
|
||||
<img src={arrow} alt="" />
|
||||
<span>INSTITUCIONAL</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
104
src/components/header/header.module.scss
Normal file
@ -0,0 +1,104 @@
|
||||
.header {
|
||||
border-bottom: 1px solid #c4c4c4;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: black;
|
||||
width: 100%;
|
||||
height: 76px;
|
||||
box-sizing: border-box;
|
||||
@media (min-width: 280px) and (max-width: 1024px) {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 2500px) {
|
||||
height: 101px;
|
||||
}
|
||||
|
||||
.headerMainContainer {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
||||
.headerContainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 100px 0 100px;
|
||||
|
||||
.headerLogoContainer img {
|
||||
@media (min-width: 2500px) {
|
||||
width: 265.62px;
|
||||
height: 50.5px;
|
||||
}
|
||||
}
|
||||
|
||||
.headerSearch {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
& input {
|
||||
box-sizing: border-box;
|
||||
padding-left: 16px;
|
||||
width: 264px;
|
||||
height: 32px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
border: 2px solid #f2f2f2;
|
||||
border-radius: 5px;
|
||||
color: #c6c6c6;
|
||||
|
||||
&::placeholder {
|
||||
color: #c6c6c6;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 516px;
|
||||
height: 57px;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
& img {
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
top: 7px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
right: 55px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.headerSafebuy {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 55px;
|
||||
|
||||
& a {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
& img {
|
||||
@media (min-width: 2500px) {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
52
src/components/header/header.tsx
Normal file
@ -0,0 +1,52 @@
|
||||
import { HeaderMenu } from "./header-menu/header-menu";
|
||||
import { HeaderRoute } from "./header-route/header-route";
|
||||
import { HeaderHamburger } from "./header-hamburger/header-hamburger";
|
||||
import { MenuAberto } from "./header-hamburger/menu-aberto";
|
||||
import { useState } from "react";
|
||||
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
|
||||
|
||||
import style from "./header.module.scss";
|
||||
import logoM3 from "./assets/logo.png";
|
||||
import cartBuy from "./assets/cart1.png";
|
||||
import searchIcon from "./assets/lupa.png";
|
||||
|
||||
export function Header() {
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Router>
|
||||
<header className={style.header}>
|
||||
<div className={style.headerMainContainer}>
|
||||
<div className={style.headerContainer}>
|
||||
<div className={style.headerLogoContainer}>
|
||||
<a href="/home">
|
||||
{" "}
|
||||
<img src={logoM3} alt=""></img>
|
||||
</a>
|
||||
</div>
|
||||
<div className={style.headerSearch}>
|
||||
<input type="text" placeholder="Buscar..." />
|
||||
<img
|
||||
className={style.socialIcons}
|
||||
src={searchIcon}
|
||||
alt=""
|
||||
></img>
|
||||
</div>
|
||||
<div className={style.headerSafebuy}>
|
||||
<Link to="entrar">ENTRAR</Link>
|
||||
<img src={cartBuy} alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</Router>
|
||||
<HeaderHamburger openModal={() => setOpenModal(true)} />
|
||||
<MenuAberto
|
||||
isOpen={openModal}
|
||||
onRequestClose={() => setOpenModal(false)}
|
||||
/>
|
||||
<HeaderMenu />
|
||||
<HeaderRoute />
|
||||
</>
|
||||
);
|
||||
}
|
184
src/components/main/form/custom-form.module.scss
Normal file
@ -0,0 +1,184 @@
|
||||
.CustomForm {
|
||||
width: 100%;
|
||||
|
||||
.CustomFormContainer {
|
||||
margin-left: 30px;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& h2 {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
color: #000000;
|
||||
margin: 0;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
text-align: center;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 48px;
|
||||
line-height: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
.FormCol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #ff0000;
|
||||
margin: 0;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.FormLabelInsta {
|
||||
margin: 12px 18px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #100d0e;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
.FormField {
|
||||
font-weight: 400;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
height: 46px;
|
||||
border: 1px solid #100d0e;
|
||||
border-radius: 25px;
|
||||
padding: 15px 20px 15px;
|
||||
box-sizing: border-box;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 63px;
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
.FormLabel {
|
||||
line-height: 16px;
|
||||
margin: 12px 0 12px 0;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #100d0e;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.FormSubmitButton {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 52.44px;
|
||||
background: #000000;
|
||||
border-radius: 25px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
line-height: 19px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
height: 71px;
|
||||
font-size: 32px;
|
||||
line-height: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.FormSubmitButton :hover {
|
||||
filter: brightness(80%);
|
||||
}
|
||||
}
|
||||
|
||||
.FormColLabel {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin: 0 18px 0;
|
||||
}
|
||||
|
||||
.formInvalidFeedback {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 12px 0 12px 0;
|
||||
align-items: center;
|
||||
|
||||
& label {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #100d0e;
|
||||
text-decoration: underline;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
& span {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: #ff0000;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
& input {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 36px;
|
||||
height: 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.successSubmit {
|
||||
margin-top: 12px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #008000;
|
||||
}
|
170
src/components/main/form/custom-form.tsx
Normal file
@ -0,0 +1,170 @@
|
||||
import style from "./custom-form.module.scss";
|
||||
import { Formik, Form, Field, ErrorMessage, FormikHelpers } from "formik";
|
||||
import Formschema from "./schema/Formschema";
|
||||
import { useState } from "react";
|
||||
|
||||
const initialValues = {
|
||||
Nome: "",
|
||||
Email: "",
|
||||
CPF: "",
|
||||
Nascimento: "",
|
||||
Telefone: "",
|
||||
Instagram: "",
|
||||
Accept: false,
|
||||
};
|
||||
|
||||
interface IformikValues {
|
||||
Nome: string;
|
||||
Email: string;
|
||||
CPF: string;
|
||||
Nascimento: string;
|
||||
Telefone: string;
|
||||
Instagram: string;
|
||||
Accept: boolean;
|
||||
}
|
||||
|
||||
export function CustomForm() {
|
||||
const [success, setSuccess] = useState(false);
|
||||
const HandleFormikSubmit = (values: IformikValues) => {
|
||||
setSuccess(true);
|
||||
console.log(values);
|
||||
};
|
||||
return (
|
||||
<div className={style.CustomForm}>
|
||||
<div className={style.CustomFormContainer}>
|
||||
<h2>Preencha o formulário</h2>
|
||||
<Formik
|
||||
validationSchema={Formschema}
|
||||
onSubmit={(values, { resetForm }) => {
|
||||
HandleFormikSubmit(values);
|
||||
resetForm();
|
||||
}}
|
||||
initialValues={initialValues}
|
||||
>
|
||||
<Form>
|
||||
<div className={style.FormCol}>
|
||||
<div className={style.FormColLabel}>
|
||||
<label className={style.FormLabel} htmlFor="Nome">
|
||||
Nome
|
||||
</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="Nome"
|
||||
className={style.formInvalidFeedback}
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
placeholder="Seu nome completo"
|
||||
className={style.FormField}
|
||||
id="Nome"
|
||||
name="Nome"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.FormCol}>
|
||||
<div className={style.FormColLabel}>
|
||||
<label className={style.FormLabel} htmlFor="Email">
|
||||
E-mail
|
||||
</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="Email"
|
||||
className={style.formInvalidFeedback}
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
placeholder="Seu e-mail"
|
||||
className={style.FormField}
|
||||
id="Email"
|
||||
name="Email"
|
||||
type="Email"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.FormCol}>
|
||||
<div className={style.FormColLabel}>
|
||||
<label className={style.FormLabel} htmlFor="CPF">
|
||||
CPF
|
||||
</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="CPF"
|
||||
className={style.formInvalidFeedback}
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
placeholder="000.000.000-00"
|
||||
className={style.FormField}
|
||||
id="CPF"
|
||||
name="CPF"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.FormCol}>
|
||||
<div className={style.FormColLabel}>
|
||||
<label className={style.FormLabel} htmlFor="Nascimento">
|
||||
Data de Nascimento
|
||||
</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="Nascimento"
|
||||
className={style.formInvalidFeedback}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
placeholder="00.00.0000"
|
||||
className={style.FormField}
|
||||
id="Nascimento"
|
||||
name="Nascimento"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.FormCol}>
|
||||
<div className={style.FormColLabel}>
|
||||
<label className={style.FormLabel} htmlFor="Telefone">
|
||||
Telefone
|
||||
</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="Telefone"
|
||||
className={style.formInvalidFeedback}
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
placeholder="(00) 00000-0000"
|
||||
className={style.FormField}
|
||||
id="Telefone"
|
||||
name="Telefone"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.FormCol}>
|
||||
<label className={style.FormLabelInsta} htmlFor="Instagram">
|
||||
Instagram
|
||||
</label>
|
||||
<Field
|
||||
placeholder="@seuuser"
|
||||
className={style.FormField}
|
||||
id="Instagram"
|
||||
name="Instagram"
|
||||
/>
|
||||
</div>
|
||||
<div className={style.formInvalidFeedback}>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="Accept"
|
||||
className={style.formInvalidSpan}
|
||||
/>
|
||||
<label>Declaro que li e aceito</label>
|
||||
<Field id="Accept" name="Accept" type="checkbox" />
|
||||
</div>
|
||||
<button className={style.FormSubmitButton} type="submit">
|
||||
CADASTRE-SE
|
||||
</button>
|
||||
{success && (
|
||||
<span className={style.successSubmit}>
|
||||
* Formulário enviado com sucesso.
|
||||
</span>
|
||||
)}
|
||||
</Form>
|
||||
</Formik>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
34
src/components/main/form/schema/Formschema.tsx
Normal file
@ -0,0 +1,34 @@
|
||||
import * as Yup from "yup";
|
||||
import "yup-phone";
|
||||
import { validateCPF, validatePhone } from "validations-br";
|
||||
import { parse, isDate } from "date-fns";
|
||||
|
||||
export default Yup.object().shape({
|
||||
Nome: Yup.string()
|
||||
.matches(/^[a-zA-Z ]*$/, "*O nome só deve conter letras.")
|
||||
.required("*Campo Obrigatório")
|
||||
.min(3, "*O nome deve ter pelo menos 3 caracteres")
|
||||
.max(50, "Limite de cacateres excedido."),
|
||||
Email: Yup.string()
|
||||
.required("*Campo Obrigatório")
|
||||
.matches(
|
||||
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
||||
"Email inválido."
|
||||
),
|
||||
CPF: Yup.string()
|
||||
.required("* Campo obrigatório.")
|
||||
.test("test-cpf", "* CPF inválido.", (cpf) => {
|
||||
if (cpf) {
|
||||
return validateCPF(cpf);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
Nascimento: Yup.date()
|
||||
.required("*Campo Obrigatório")
|
||||
.typeError("Data de nascimento inválida"),
|
||||
Telefone: Yup.string()
|
||||
.required("*Campo Obrigatório")
|
||||
.phone(undefined, false, "Número de telefone inválido"),
|
||||
Accept: Yup.boolean().oneOf([true], "*"),
|
||||
});
|
70
src/components/main/main-content.module.scss
Normal file
@ -0,0 +1,70 @@
|
||||
.institutional {
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
.institutionalTitle {
|
||||
text-align: center;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
margin: 0;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 48px;
|
||||
line-height: 56px;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
}
|
||||
|
||||
.institutionalContainer {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
||||
.institutionalMainContainer {
|
||||
display: flex;
|
||||
margin: 90px 100px;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
flex-direction: column;
|
||||
margin: 40px 16px;
|
||||
}
|
||||
|
||||
.InstitutionalNavContainer {
|
||||
width: 302px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-right: 1px solid #000000;
|
||||
height: 285px;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
width: 100%;
|
||||
border: none;
|
||||
height: 234px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
width: 590px;
|
||||
height: 465px;
|
||||
}
|
||||
|
||||
.NavSpan {
|
||||
padding: 10px 16px;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
color: #7d7d7d;
|
||||
line-height: 19px;
|
||||
cursor: pointer;
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 32px;
|
||||
line-height: 38px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
101
src/components/main/main-content.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import style from "./main-content.module.scss";
|
||||
import { CustomForm } from "./form/custom-form";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Text } from "./text/text";
|
||||
|
||||
export function MainContent() {
|
||||
const arr = [
|
||||
{
|
||||
name: "Sobre",
|
||||
content: (
|
||||
<Text
|
||||
content1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||
content2="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem."
|
||||
content3="Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
||||
title="Sobre"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Forma de pagamento",
|
||||
content: (
|
||||
<Text
|
||||
content1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
|
||||
content2=" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Sed ut perspiciatis unde omnis iste natus error."
|
||||
content3=""
|
||||
title="Forma de pagamento"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Entrega",
|
||||
content: (
|
||||
<Text
|
||||
content1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
|
||||
content2=" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Sed ut perspiciatis unde omnis iste natus error."
|
||||
content3=""
|
||||
title="Entrega"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Troca e Devolução",
|
||||
content: (
|
||||
<Text
|
||||
content1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
|
||||
content2=" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Sed ut perspiciatis unde omnis iste natus error."
|
||||
content3=""
|
||||
title="Troca e devolução"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Segurança e Privacidade",
|
||||
content: (
|
||||
<Text
|
||||
content1="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
|
||||
content2=" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Sed ut perspiciatis unde omnis iste natus error."
|
||||
content3=""
|
||||
title="Segurança e Privacidade"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "Contato", content: <CustomForm /> },
|
||||
];
|
||||
const [content, setContent] = useState<string | JSX.Element>(arr[0].content);
|
||||
const [selectedItem, setSelectedItem] = useState<string>(arr[0].name);
|
||||
return (
|
||||
<div className={style.institutional}>
|
||||
<h1 className={style.institutionalTitle}>INSTITUCIONAL</h1>
|
||||
<div className={style.institutionalContainer}>
|
||||
<div className={style.institutionalMainContainer}>
|
||||
<div>
|
||||
<nav className={style.InstitutionalNavContainer}>
|
||||
{arr.map((item) => {
|
||||
return (
|
||||
<span
|
||||
className={style.NavSpan}
|
||||
style={{
|
||||
color: selectedItem === item.name ? "white" : "#7D7D7D",
|
||||
backgroundColor:
|
||||
selectedItem === item.name ? "black" : "white",
|
||||
}}
|
||||
key={item.name}
|
||||
onClick={() => {
|
||||
setSelectedItem(item.name);
|
||||
setContent(item.content);
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
</div>
|
||||
{content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
46
src/components/main/text/text.module.scss
Normal file
@ -0,0 +1,46 @@
|
||||
.textContainer {
|
||||
margin-left: 30px;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& h2 {
|
||||
margin: 0;
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
color: #292929;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 48px;
|
||||
line-height: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
& p {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
color: #7d7d7d;
|
||||
margin: 12px 0;
|
||||
text-align: justify;
|
||||
|
||||
@media (max-width: 1024px) and (min-width: 280px) {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (min-width: 2500px) {
|
||||
font-size: 26px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
19
src/components/main/text/text.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import style from "./text.module.scss";
|
||||
|
||||
interface TextProps {
|
||||
content1: string;
|
||||
content2: string;
|
||||
content3: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export function Text({ content1, content2, content3, title }: TextProps) {
|
||||
return (
|
||||
<div className={style.textContainer}>
|
||||
<h2>{title}</h2>
|
||||
<p>{content1}</p>
|
||||
<p>{content2}</p>
|
||||
<p>{content3}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
13
src/global.module.scss
Normal file
@ -0,0 +1,13 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||
monospace;
|
||||
}
|
13
src/index.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import "./global.module.scss";
|
||||
import { Home } from "./pages/Home";
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById("root") as HTMLElement
|
||||
);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<Home />
|
||||
</React.StrictMode>
|
||||
);
|
15
src/pages/Home.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { Header } from "../components/header/header";
|
||||
import { MainContent } from "../components/main/main-content";
|
||||
import { Footer } from "../components/footer/footer";
|
||||
import { FloatingButtons } from "../components/floating-buttons/floating-buttons";
|
||||
|
||||
export function Home() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Header />
|
||||
<MainContent />
|
||||
<Footer />
|
||||
<FloatingButtons />
|
||||
</div>
|
||||
);
|
||||
}
|
1
src/react-app-env.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference types="react-scripts" />
|
26
tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|