feat: Cria validações do formulário de contato

This commit is contained in:
Eleonora Otz de Mendonça Soares 2023-01-13 20:15:07 -03:00
parent bf4ca0c263
commit 0ef5cc3e18
25 changed files with 485 additions and 305 deletions

15
package-lock.json generated
View File

@ -23,6 +23,7 @@
"react-modal": "^3.16.1",
"react-router-dom": "^6.6.1",
"react-scripts": "5.0.1",
"react-scroll-to-top": "^3.0.0",
"react-text-mask": "^5.5.0",
"sass": "^1.57.1",
"typescript": "^4.9.4",
@ -14252,6 +14253,14 @@
}
}
},
"node_modules/react-scroll-to-top": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/react-scroll-to-top/-/react-scroll-to-top-3.0.0.tgz",
"integrity": "sha512-I/k45Ujai097du59tHBbzGxN7Lyc6K8Uc3IChq6HMXaBfB8N/rrfm055T5Yv0DWfVpf6pOFaBmhD3LOfH5unGw==",
"peerDependencies": {
"react": "^16.8.0 || 17.x || ^18"
}
},
"node_modules/react-text-mask": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/react-text-mask/-/react-text-mask-5.5.0.tgz",
@ -27118,6 +27127,12 @@
"workbox-webpack-plugin": "^6.4.1"
}
},
"react-scroll-to-top": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/react-scroll-to-top/-/react-scroll-to-top-3.0.0.tgz",
"integrity": "sha512-I/k45Ujai097du59tHBbzGxN7Lyc6K8Uc3IChq6HMXaBfB8N/rrfm055T5Yv0DWfVpf6pOFaBmhD3LOfH5unGw==",
"requires": {}
},
"react-text-mask": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/react-text-mask/-/react-text-mask-5.5.0.tgz",

View File

@ -18,6 +18,7 @@
"react-modal": "^3.16.1",
"react-router-dom": "^6.6.1",
"react-scripts": "5.0.1",
"react-scroll-to-top": "^3.0.0",
"react-text-mask": "^5.5.0",
"sass": "^1.57.1",
"typescript": "^4.9.4",

View File

@ -9,21 +9,6 @@
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>M3 Academy</title>
</head>
<body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="66" height="66" viewBox="0 0 66 66">
<image width="66" height="66" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAD7UlEQVR4nO1czVXjMBAeyQ4HTukAU8GGYwiwpAKgAqCCpYOFDnYrIFsBbAXOAoEjdLCmgs2Ng2zNvsmT8xzHTmzH/+I78R7EGX18M5JGn8ygBLy8vFhCiGPO+RfGmIWIFgB0AcAKfbsDAFPGmIOIjpTyj2EYzmAweCs6ysKIeHx8PGaMnSDiBWOsu+HjiKCxlPL30dHRfU4hLiBXImzbtra2ts6llFc5DD4OM1KEEDfD4dDJ66G5EEEEdDqd7wBwkcfzUmCUFyEbEWHbdlcRcLVpIBtiY0IyE/H8/Hzqed5tgSmQFg5j7GYwGIyyfDg1ETVSQRx+KHVM03woFRGqFtwBQC+PiAuEI4QYpkmVxETYtt1TJITn/roiFRmJiCASTNO0a1QPkoIWZ8MkC7K1RFA6mKb52kASfCQig6/6paoJTVRCEF1EvKOxrPqjWEWo2eG1QTVhHd5UzYicTWIVoabItpBA6KkxRSJSEZPJ5AIRb0sNsyRIKc+iNm5LRPh1oWVqCGIqhNgNp8hSarQwJcLoRqXIgiKUGv5WFWGZUKqYL7YWFLGqmLQN4bHOFaGTGnwEVTFXhE5q8GGa5ryRFEyN48oiqgiMsW/+N8+IeHh4OG35TBGHLjWZwSeCc35SxyhLAolgnhrapYUPxtg5/chUw+W1FlFVhO3tbYsbhqFjbVjAx8fHkDPGtE0LH1LKHtWInXqEUx3oPJYUoX1qkBi4OpXWGtSK5JoupBZANoWVzVud8EmEwicRClwZL7QGWZWIiFSnxm0EIk45mbZ0JwIA3kkR7zUIpFKQGEgRhVv36g5EHHPP88a6E0FezlkX++np6Z/GS23n4OBgd7aOQMRf1cdTGWYZ4S+oCnGzNgHk5oXgAY+m6TFLCwgusRHxZ6UhVYP5RDEnwnXdTEbNJoP8mEtE0BmglFKnojmKPQ33PO+6kpAqQFANECaCGNKkVozCRtSlfoTrutct35E6YTVAFBHkLZJSXpYWVskgB3+ULTmyQ0WuszamCI0p7hpDbKtOpUibdqaOGlMkYomgFBFCnLWkleesct1CElP6ZDLpIaLd1OU3teFc191bd11hbRebXO3kbm/iTKJISHRnI1E7n8gQQuw1LE0cRUKiOpflKlMT7Mn0jztLc5Up1QEPPZiUUeeplWJLe58LNrnuqBz8tfFtUz0wDONyf38/U5Mp85EfLUyI+TrsWEkFruvuZiUB8rwSbRjGNef8PI/npUA9rkSHESDka1EpQykAAKSApR3kJijstQnKzXuaBylq8JSC94eHh4Wcw5TyIg1anXqeZ5GDj3O+k+RFGlLKdzqF63Q6436/X+z6BQD+A8td0q9G7QDqAAAAAElFTkSuQmCC"/>
<image id="Vector_1_" data-name="Vector (1)" x="20" y="26" width="25" height="13" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAANCAYAAABcrsXuAAABFUlEQVQ4ja3SLUsEURjFcYeVDVs2bbMIVqsYRYymbSb3Gyz4ATSYtRmNNsFgMxkUi1ksmgyi4rv4gviTC3fwMgzrjO4pM3fueZ7/ee6dkarCLK5wh8XKhTUAXTz50TOWhgnoFQC5Amh1GIB+yQTF9cZ/AMuFhuF9BQuF7y/YQlYXsB5TpoB+sj+PxwJoF40qzTNslgB6Jd4ZPCS+V+yjOQjQwHZMlQK6A2qm4i+d6w3HaJWZm9iLaXKF45irMP0kbpK6D5ygnZpaOMR7YgzHMP0bIOkxgcuk/hNn6OSGg0jPdRvSVQUkoDFc4Cv2Cc9zjIbN9A6uQ6q6gATUiROESYLuMR421uIFn4Y0fwUkoDaOYs8dZN8I0hPIVBZGhgAAAABJRU5ErkJggg=="/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,12 +1,10 @@
<svg width="66" height="137" viewBox="0 0 66 137" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M66 104C66 122.225 51.2254 137 33 137C14.7746 137 0 122.225 0 104C0 85.7746 14.7746 71 33 71C51.2254 71 66 85.7746 66 104Z" fill="#C4C4C4"/>
<path d="M44.7428 107.396C44.741 107.696 44.6177 107.995 44.373 108.226L44.3728 108.226C43.8668 108.704 43.037 108.703 42.5311 108.226L42.5232 108.235L42.5311 108.226L33.3457 99.5599L33.0712 99.3009L32.7967 99.5599L23.6118 108.226C23.1055 108.703 22.2757 108.703 21.7698 108.226L21.7697 108.226C21.5257 107.996 21.4025 107.697 21.4 107.398C21.4019 107.098 21.5251 106.799 21.7698 106.568L21.7698 106.568L32.1506 96.7738C32.4013 96.5373 32.7333 96.4158 33.0712 96.4158C33.4093 96.4158 33.7415 96.5376 33.9922 96.774L44.3728 106.568L44.3729 106.568C44.6171 106.798 44.7403 107.097 44.7428 107.396Z" fill="white" stroke="white" stroke-width="0.8"/>
<g clip-path="url(#clip0_4136_1036)">
<svg width="66" height="66" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3751_658)">
<path d="M33.0083 0H32.9917C14.7964 0 0 14.8005 0 33C0 40.2188 2.3265 46.9095 6.28237 52.3421L2.16975 64.6016L14.8541 60.5468C20.0723 64.0035 26.2969 66 33.0083 66C51.2036 66 66 51.1954 66 33C66 14.8046 51.2036 0 33.0083 0Z" fill="#4CAF50"/>
<path d="M52.2103 46.6001C51.4142 48.8483 48.2544 50.7128 45.734 51.2573C44.0098 51.6244 41.7575 51.9173 34.1758 48.774C24.4779 44.7563 18.2326 34.9016 17.7459 34.2623C17.2798 33.6229 13.8271 29.0441 13.8271 24.3086C13.8271 19.5731 16.232 17.2673 17.2014 16.2773C17.9975 15.4646 19.3134 15.0934 20.5756 15.0934C20.984 15.0934 21.3511 15.114 21.6811 15.1305C22.6505 15.1718 23.1373 15.2295 23.7766 16.7599C24.5728 18.678 26.5115 23.4135 26.7425 23.9003C26.9776 24.387 27.2128 25.047 26.8828 25.6864C26.5734 26.3464 26.3011 26.6393 25.8144 27.2003C25.3276 27.7613 24.8656 28.1903 24.3789 28.7925C23.9334 29.3164 23.4301 29.8774 23.9911 30.8468C24.5521 31.7955 26.4909 34.9594 29.3454 37.5004C33.029 40.7798 36.0155 41.8275 37.0839 42.273C37.88 42.603 38.8288 42.5246 39.4104 41.9059C40.1488 41.1098 41.0604 39.7898 41.9885 38.4904C42.6485 37.5581 43.4818 37.4426 44.3563 37.7726C45.2473 38.082 49.9622 40.4126 50.9315 40.8953C51.9009 41.382 52.5403 41.613 52.7754 42.0214C53.0064 42.4298 53.0064 44.3479 52.2103 46.6001Z" fill="white"/>
<path d="M52.21 46.6001C51.4139 48.8483 48.2542 50.7128 45.7338 51.2573C44.0095 51.6244 41.7573 51.9173 34.1755 48.774C24.4777 44.7563 18.2324 34.9016 17.7457 34.2623C17.2795 33.6229 13.8269 29.0441 13.8269 24.3086C13.8269 19.5731 16.2318 17.2673 17.2012 16.2773C17.9973 15.4646 19.3132 15.0934 20.5754 15.0934C20.9838 15.0934 21.3509 15.114 21.6809 15.1305C22.6503 15.1718 23.137 15.2295 23.7764 16.7599C24.5725 18.678 26.5113 23.4135 26.7423 23.9003C26.9774 24.387 27.2125 25.047 26.8825 25.6864C26.5732 26.3464 26.3009 26.6393 25.8142 27.2003C25.3274 27.7613 24.8654 28.1903 24.3787 28.7925C23.9332 29.3164 23.4299 29.8774 23.9909 30.8468C24.5519 31.7955 26.4907 34.9594 29.3452 37.5004C33.0288 40.7798 36.0153 41.8275 37.0837 42.273C37.8798 42.603 38.8285 42.5246 39.4102 41.9059C40.1485 41.1098 41.0602 39.7898 41.9883 38.4904C42.6483 37.5581 43.4815 37.4426 44.356 37.7726C45.247 38.082 49.9619 40.4126 50.9313 40.8953C51.9007 41.382 52.54 41.613 52.7752 42.0214C53.0062 42.4298 53.0062 44.3479 52.21 46.6001Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_4136_1036">
<clipPath id="clip0_3751_658">
<rect width="66" height="66" fill="white"/>
</clipPath>
</defs>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,9 +1,8 @@
import React from "react";
import React, { useState } from "react";
import { Formik, Form, Field, ErrorMessage, FormikHelpers } from "formik";
import { Formik, Form, Field, ErrorMessage } from "formik";
import FormSchema from "../../../schema/FormSchema";
import styles from "./style.module.scss";
interface IFormikValues {
@ -27,67 +26,89 @@ const initialValues = {
};
const CustomForm = () => {
const handleFormikSubmit = (values: IFormikValues) => {
// console.log(values);
const [successFeedback, setSuccessFeedback] = useState(false);
const handleFormikSubmit = (values: IFormikValues, { resetForm }: any) => {
resetForm();
setSuccessFeedback(true);
setTimeout(() => setSuccessFeedback(false), 3000);
console.log(values);
};
return (
<div className={styles["form-wrapper"]}>
<Formik
onSubmit={(handleFormikSubmit, {resetForm}) =>{
console.log(handleFormikSubmit);
resetForm();
}}
onSubmit={handleFormikSubmit}
initialValues={initialValues}
validationSchema={FormSchema}
>
<Form>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="name">Nome</label>
<Field type="text" id="name" name="name" placeholder="Seu nome completo" />
<Field
type="text"
id="name"
name="name"
placeholder="Seu nome completo"
/>
<ErrorMessage
component="span"
name="name"
className="invalid-feedback"
/>
</div>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="email">E-mail</label>
<Field type="text" id="email" name="email" placeholder="Seu e-mail" />
<Field
type="text"
id="email"
name="email"
placeholder="Seu e-mail"
/>
<ErrorMessage
component="span"
name="email"
className="invalid-feedback"
/>
</div>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="cpf">CPF</label>
<Field type= "text" id="cpf" name="cpf" placeholder="000.000.000-00" />
<Field
type="text"
id="cpf"
name="cpf"
placeholder="000.000.000-00"
/>
<ErrorMessage
component="span"
name="cpf"
className="invalid-feedback"
/>
</div>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="date">Data de Nascimento:</label>
<Field type= "text" id="date" name="date" placeholder="00.00.0000" />
<Field type="text" id="date" name="date" placeholder="00.00.0000" />
<ErrorMessage
component="span"
name="date"
className="invalid-feedback"
/>
</div>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="tel">Telefone:</label>
<Field type= "tel" id="tel" name="tel" placeholder="(00) 00000-0000" />
<Field
type="tel"
id="tel"
name="tel"
placeholder="(00) 00000-0000"
/>
<ErrorMessage
component="span"
name="tel"
className="invalid-feedback"
/>
</div>
<div>
<div className={styles["form-inputs"]}>
<label htmlFor="instagram">Instagram</label>
<Field id="instagram" name="instagram" placeholder="@seuuser" />
<ErrorMessage
@ -96,14 +117,21 @@ const CustomForm = () => {
className="invalid-feedback"
/>
</div>
<div className={styles["terms"]}>
<label className={styles["terms__content"]}>
<div className={styles["form-terms"]}>
<p className={styles["form-terms__red"]}>*</p>
<label className={styles["form-terms__content"]}>
Declaro que li e aceito
<Field type="checkbox" name="termsAndConditions" />
</label>
</div>
<button type="submit">CADASTRE-SE</button>
<p>*Formulário enviado com sucesso!</p>
{successFeedback ? (
<p className={styles["success-feedback"]}>
*Formulário enviado com sucesso!
</p>
) : (
""
)}
</Form>
</Formik>
</div>

View File

@ -1,8 +1,8 @@
.form-wrapper {
// width: 58.438%;
width: 100%;
// height: auto;
div {
.form-inputs {
display: flex;
flex-direction: column;
position: relative;
@ -60,70 +60,54 @@
line-height: 28px;
}
}
}
.terms {
// position: relative;
.form-terms {
display: flex;
justify-content: center;
&__content {
display: flex;
align-items: end;
align-self: center;
justify-content: center;
margin: 0 0 12px;
text-decoration: underline;
font-weight: 400;
font-size: 14px;
line-height: 16px;
&__content {
display: flex;
align-items: end;
align-self: center;
justify-content: center;
margin: 0 0 12px;
text-decoration: underline;
font-weight: 400;
font-size: 14px;
line-height: 16px;
&::before {
text-decoration: none;
content: "* ";
color: var(--red);
}
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
input {
border: 1px solid var(--black);
border-radius: 3px;
width: 18px;
height: 18px;
margin: 0 0 0 4.28px;
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
input {
border: 1px solid var(--black);
border-radius: 3px;
width: 18px;
height: 18px;
margin: 0 0 0 4.28px;
@media (min-width: 2500px) {
width: 36.4px;
height: 36.4px;
}
}
input[value="true"] {
color: var(--blue);
width: 36.4px;
height: 36.4px;
}
}
}
// p {
// position: absolute;
// font-size: 14px;
// line-height: 16px;
// color: var(--red);
// right: 464px;
// top: -13px;
&__red {
margin: 0 4px 0 0;
font-weight: 400;
font-size: 14px;
line-height: 16px;
color: var(--red);
// @media (min-width: 2500px) {
// font-size: 28px;
// line-height: 33px;
// right: 995px;
// top: -23px;
// }
// @media (max-width: 1024px) {
// right: 577px;
// }
// }
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
}
}
button {
@ -150,7 +134,7 @@
}
}
p {
.success-feedback {
font-weight: 400;
font-size: 12px;
line-height: 14px;

View File

@ -1,6 +1,5 @@
.contato {
width: 60.782%;
// width: 58.438%;
width: 58.438%;
height: auto;
margin: 0 0 0 30px;

View File

@ -1,5 +1,5 @@
.entrega {
width: 58.438%;
width: 85.22%;
height: auto;
margin: 0 0 0 30px;
@ -48,6 +48,7 @@
@media (max-width: 1024px) {
font-size: 12px;
line-height: 18px;
text-align: justify;
}
}
}

View File

@ -2,6 +2,7 @@ import React from "react";
import styles from "./style.module.scss";
import ScrollToTop from "react-scroll-to-top"
// Social media icons
@ -27,6 +28,10 @@ import PCIVtex from "../../assets/svgs/vtex-pci-200.svg";
import Whatsapp from "../../assets/svgs/whatsapp.svg";
// Scroll up
import { ReactComponent as ScrollUp } from "../../assets/svgs/arrow-up.svg"
// Vtex e M3 logo
import Vtex from "../../assets/svgs/vtex-logo.svg";
@ -36,16 +41,6 @@ import { AccordionMenu } from "./AccordionMenu";
const Footer = () => {
return (
<div>
<section className={styles["newsletter"]}>
<div className={styles["newsletter__wrapper"]}>
<h2 className={styles["newsletter__title"]}>
Assine nossa newsletter
</h2>
<input type="email" placeholder="E-mail" />
<button type="submit">Enviar</button>
</div>
</section>
<section className={styles["footer-top"]}>
<AccordionMenu></AccordionMenu>
@ -109,31 +104,31 @@ const Footer = () => {
<div className={styles["social-media-icons"]}>
<ul>
<li>
<a href="/">
<a target={"_blank"} rel="noopener noreferrer" href="https://www.facebook.com/digitalm3/">
<img src={Facebook} alt="Link para o Facebook" />
</a>
</li>
<li>
<a href="/">
<a target={"_blank"} rel="noopener noreferrer" href="https://www.instagram.com/m3.ecommerce/">
<img src={Instagram} alt="Link para o Instagram" />
</a>
</li>
<li>
<a href="/">
<a target={"_blank"} rel="noopener noreferrer" href="https://twitter.com/">
<img src={Twitter} alt="Link para o Twitter" />
</a>
</li>
<li>
<a href="/">
<a target={"_blank"} rel="noopener noreferrer" href="https://www.youtube.com/@m3academy392">
<img src={Youtube} alt="Link para o Youtube" />
</a>
</li>
<li>
<a href="/">
<a target={"_blank"} rel="noopener noreferrer" href="https://www.linkedin.com/company/m3ecommerce/">
<img src={LinkedIn} alt="Link para o LinkedIn" />
</a>
</li>
@ -190,7 +185,7 @@ const Footer = () => {
<ul className={styles["developedBy"]}>
<li>
<div className={styles["by-vtex"]}>
<a href="https://vtex.com.br-pt/">
<a target={"_blank"} rel="noopener noreferrer" href="https://vtex.com/br-pt/">
<span>Powered By</span>
</a>
<img className={styles["vtex-logo"]} src={Vtex} alt="VTEX" />
@ -198,7 +193,7 @@ const Footer = () => {
</li>
<li>
<div className={styles["by-m3"]}>
<a href="https://m3ecommerce.com/">
<a target={"_blank"} rel="noopener noreferrer" href="https://m3ecommerce.com/">
<span>Developed By</span>
</a>
<img className={styles["m3-logo"]} src={M3} alt="M3" />
@ -208,14 +203,16 @@ const Footer = () => {
</div>
</section>
<div className={styles["whatsapp-button"]}>
<div className={styles["whatsapp-scrollup"]}>
<a
href="https://wa.me/5579995657055?text=Olá! Tudo bem? Quero conhecer o M3 Academy."
rel="noreferrer"
rel=" noopener noreferrer"
target={"_blank"}
>
<img src={Whatsapp} alt="Fale conosco pelo Whatsapp" />
</a>
< ScrollToTop smooth component={ <ScrollUp /> } />
</div>
</div>
);

View File

@ -0,0 +1,47 @@
import React from "react";
import { Formik, Form, Field, ErrorMessage } from "formik";
import NewsFormSchema from "../../../schema/NewsFormSchema";
import styles from "./style.module.scss";
interface IFormikValues {
Email: string;
}
const initialValues = {
Email: "",
};
const Newsletter = () => {
const handleFormikSubmit = (values: IFormikValues, { resetForm }: any) => {
resetForm();
console.log(values);
};
return (
<section className={styles["newsletter"]}>
<div className={styles["newsletter__wrapper"]}>
<h2 className={styles["newsletter__title"]}>Assine nossa newsletter</h2>
<Formik
onSubmit={handleFormikSubmit}
initialValues={initialValues}
validationSchema={NewsFormSchema}
>
<Form>
<Field type="text" id="Email" name="Email" placeholder="E-mail" />
<ErrorMessage
component="span"
name="Email"
className="invalid-feedback"
/>
<button type="submit">Enviar</button>
</Form>
</Formik>
</div>
</section>
);
};
export { Newsletter };

View File

@ -0,0 +1,135 @@
.newsletter {
width: 100%;
border-width: 1px 0px;
border-style: solid;
border-color: var(--black);
background: var(--white);
margin-top: 70px;
&__wrapper {
width: 37.032%;
margin: 16px auto;
@media (min-width: 2500px) {
width: 36.88%;
}
@media (max-width: 1024px) {
width: 96.88%;
margin: 16px;
}
@media (max-width: 599px) {
width: 91.6%;
}
}
&__title {
margin: 0 0 8px;
font-weight: 500;
font-size: 18px;
line-height: 21px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--dark-gray-100);
@media (min-width: 2500px) {
font-size: 36px;
line-height: 42px;
}
@media (max-width: 1024px) {
margin: 0 0 16px;
font-size: 14px;
line-height: 16px;
}
}
form {
position: relative;
}
input {
width: 64.557%;
border: 1px solid var(--light-gray-400);
border-radius: 4px;
padding: 13px 16px;
color: var(--light-gray-500);
font-weight: 400;
font-size: 14px;
line-height: 16px;
&::placeholder {
color: var(--light-gray-500);
}
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
@media (max-width: 1024px) {
width: 96.88%;
margin: 0 0 16px;
border-radius: 0;
padding: 16px 17px;
}
@media (max-width: 599px) {
width: 90%;
}
}
span {
position: absolute;
left: 2px;
bottom: -14px;
font-weight: 400;
font-size: 12px;
line-height: 14px;
text-align: right;
color: var(--red);
@media (min-width: 2500px) {
font-size: 24px;
line-height: 28px;
}
}
button {
width: 26.585%;
padding: 14px 20px;
margin-left: 8px;
background: var(--black);
color: var(--white);
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border: none;
border-radius: 4px;
font-family: "Roboto", sans-serif;
font-weight: 700;
font-size: 12px;
line-height: 14px;
letter-spacing: 0.05em;
text-align: center;
text-transform: uppercase;
cursor: pointer;
&:hover {
background: var(--dark-gray-200);
}
@media (min-width: 2500px) {
font-size: 24px;
line-height: 28px;
}
@media (max-width: 1024px) {
width: 100%;
margin: 0;
border-radius: 0;
font-size: 14px;
line-height: 16px;
box-shadow: none;
}
}
}

View File

@ -1,119 +1,3 @@
.newsletter {
width: 100%;
border-width: 1px 0px;
border-style: solid;
border-color: var(--black);
background: var(--white);
margin-top: 70px;
&__wrapper {
width: 37.032%;
margin: 16px auto;
@media (min-width: 2500px) {
width: 36.88%;
}
@media (max-width: 1024px) {
width: 96.88%;
margin: 16px;
}
@media (max-width: 599px) {
width: 91.6%;
}
}
&__title {
margin: 0 0 8px;
font-weight: 500;
font-size: 18px;
line-height: 21px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--dark-gray-100);
@media (min-width: 2500px) {
font-size: 36px;
line-height: 42px;
}
@media (max-width: 1024px) {
margin: 0 0 16px;
font-size: 14px;
line-height: 16px;
}
}
input {
width: 64.557%;
border: 1px solid var(--light-gray-400);
border-radius: 4px;
padding: 13px 16px;
color: var(--light-gray-500);
font-weight: 400;
font-size: 14px;
line-height: 16px;
&::placeholder {
color: var(--light-gray-500);
}
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
@media (max-width: 1024px) {
width: 96.88%;
margin: 0 0 16px;
border-radius: 0;
padding: 16px 17px;
}
@media (max-width: 599px) {
width: 90%;
}
}
button {
width: 26.585%;
padding: 14px 20px;
margin-left: 8px;
background: var(--black);
color: var(--white);
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border: none;
border-radius: 4px;
font-family: "Roboto", sans-serif;
font-weight: 700;
font-size: 12px;
line-height: 14px;
letter-spacing: 0.05em;
text-align: center;
text-transform: uppercase;
cursor: pointer;
&:hover {
background: var(--dark-gray-200);
}
@media (min-width: 2500px) {
font-size: 24px;
line-height: 28px;
}
@media (max-width: 1024px) {
width: 100%;
margin: 0;
border-radius: 0;
font-size: 14px;
line-height: 16px;
box-shadow: none;
}
}
}
.footer-top {
@media (max-width: 1024px) {
width: 100%;
@ -211,7 +95,6 @@
}
}
a {
text-decoration: none;
color: var(--dark-gray-100);
@ -221,14 +104,14 @@
font-weight: 400;
font-size: 14px;
line-height: 16px;
@media (min-width: 2500px) {
font-size: 28px;
line-height: 33px;
}
@media (max-width: 1024px) {
margin: 0 16px 24px;
margin: 0 16px 24px;
}
}
}
@ -309,14 +192,14 @@
@media (min-width: 768px) and (max-width: 1024px) {
width: 46.134%;
margin: 21.94px 0 21.94px 16px;
margin: 15px 0 11px 16px;
}
@media (max-width: 767px) {
width: 100%;
order: 1;
gap: 11px;
margin: 22px 16px 23px 16px;
margin: 22px 16px 11px 16px;
}
.creditcard {
@ -334,7 +217,6 @@
}
.vtex {
.vtex-pci {
width: 54.61px;
@ -440,26 +322,58 @@
}
}
.whatsapp-button {
.whatsapp-scrollup {
display: flex;
flex-direction: column;
align-items: center;
position: fixed;
bottom: 190px;
right: 16px;
z-index: 9999;
img {
width: 34px;
a {
position: fixed;
bottom: 225px;
right: 16px;
@media (min-width: 2500px) {
width: 100%;
@media (max-width: 1024px) {
bottom: 91px;
right: 17px;
}
@media (max-width: 767px) {
bottom: 69px;
right: 17px;
}
}
@media (max-width: 1024px) {
bottom: 27.31px;
right: 17px;
button {
position: fixed;
bottom: 224px;
right: 50px;
background: transparent;
margin: 0;
padding: 0;
width: 0;
height: 0;
@media (max-width: 1024px) {
bottom: 92px;
right: 51px;
}
@media (max-width: 767px) {
bottom: 68px;
right: 51px;
}
}
@media (max-width: 375px) {
bottom: 28px;
img,
svg {
width: 34px;
height: 34px;
@media (min-width: 2500px) {
width: 66px;
height: 66px;
}
}
}

View File

@ -1,4 +1,4 @@
import React, { useState } from "react";
import React from "react";
import logom3Academy from "../../assets/imgs/Logo-M3Academy.png";
import styles from "../header/style.module.scss";

View File

@ -48,6 +48,7 @@
@media (max-width: 1024px) {
font-size: 12px;
line-height: 18px;
text-align: justify;
}
}
}

View File

@ -48,6 +48,7 @@
@media (max-width: 1024px) {
font-size: 12px;
line-height: 18px;
text-align: justify;
}
}
}

View File

@ -2,27 +2,70 @@ import React from "react";
import { Root } from "../../routes/root";
import styles from "./style.module.scss";
import { Link } from "react-router-dom";
import { NavLink } from "react-router-dom";
export default function SideBar() {
return (
<>
<div className={styles["sidebar"]}>
<nav className={styles["sidebar__list"]}>
<ul>
<li><Link to="/">Sobre</Link></li>
<li><Link to="/pagamento">Forma de Pagamento</Link></li>
<li><Link to="/entrega">Entrega</Link></li>
<li><Link to="/troca">Troca e Devolução</Link></li>
<li><Link to="/segurança">Segurança e Privacidade</Link></li>
<li><Link to="/contato">Contato</Link></li>
</ul>
</nav>
<div className={styles["sidebar__divider"]}></div>
<Root />
</div>
</>
);
};
export { SideBar };
return (
<>
<div className={styles["sidebar"]}>
<nav className={styles["sidebar__list"]}>
<ul>
<li>
<NavLink
to="/"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Sobre
</NavLink>
</li>
<li>
<NavLink
to="/pagamento"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Forma de Pagamento
</NavLink>
</li>
<li>
<NavLink
to="/entrega"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Entrega
</NavLink>
</li>
<li>
<NavLink
to="/troca"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Troca e Devolução
</NavLink>
</li>
<li>
<NavLink
to="/segurança"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Segurança e Privacidade
</NavLink>
</li>
<li>
<NavLink
to="/contato"
className={({ isActive }) => (isActive ? styles.activeLink : undefined)}
>
Contato
</NavLink>
</li>
</ul>
</nav>
<div className={styles["sidebar__divider"]}></div>
<Root />
</div>
</>
);
}
export { SideBar };

View File

@ -6,40 +6,58 @@
}
&__list {
ul {
list-style: none;
padding: 0;
margin: 0 90px 0 80px;
margin-left: 100px;
@media (max-width: 1024px) {
margin: 0;
margin: 16px;
}
li {
margin: 20px 16px;
a {
margin: 20px 0;
width: 302px;
@media (min-width: 2500px) {
// width: 23.6%;
width: 590px;
}
@media (max-width: 1024px) {
width: 100%;
}
a {
display: block;
padding-left: 16px;
font-weight: 400;
font-size: 16px;
line-height: 19px;
text-decoration: none;
color: var(--medium-gray-200);
cursor: pointer;
@media (min-width: 2500px) {
font-weight: 400;
font-size: 16px;
line-height: 19px;
text-decoration: none;
color: var(--medium-gray-200);
cursor: pointer;
@media (min-width: 2500px) {
font-weight: 400;
font-size: 32px;
line-height: 38px;
}
font-size: 32px;
line-height: 38px;
}
}
.activeLink {
background: var(--black);
color: var(--white);
font-weight: 700;
padding: 10px 10px 12px 16px;
// margin: 20px 16px;
}
}
}
@media (max-width: 1024px) {
margin: 0 0 10px 0;
}
margin: 0 0 10px 0;
}
}
&__divider {
@ -49,11 +67,11 @@
height: 285px;
@media (min-width: 2500px) {
height: 465px;
height: 465px;
}
@media (max-width: 1024px) {
display: none;
display: none;
}
}
}

View File

@ -48,6 +48,7 @@
@media (max-width: 1024px) {
font-size: 12px;
line-height: 18px;
text-align: justify;
}
}
}

View File

@ -48,6 +48,7 @@
@media (max-width: 1024px) {
font-size: 12px;
line-height: 18px;
text-align: justify;
}
}
}

View File

@ -5,6 +5,7 @@ import { Breadcrumb } from "../components/breadcrumbs-title";
import { SideBar } from "../components/sidebar";
import { Footer } from "../components/footer";
import { BrowserRouter } from "react-router-dom";
import { Newsletter } from "../components/footer/newsletter";
const Institucional = () => {
const [openModal, setOpenModal] = useState(false);
@ -19,6 +20,7 @@ const Institucional = () => {
<main>
<Breadcrumb />
<SideBar />
<Newsletter />
</main>
<Footer />
</ BrowserRouter>

View File

@ -1,10 +1,9 @@
import * as Yup from "yup";
import { cpf } from "cpf-cnpj-validator";
import { dateNumber, phoneNumber, instaUser, cpfNumber } from "./validators";
export default Yup.object().shape({
// Formulário de contato
name: Yup.string().required("*Campo obrigatório").min(3, "Nome deve ter no mínimo 3 caracteres"),
email: Yup.string().required("*Campo obrigatório").email("E-mail inválido"),
cpf: Yup.string().matches(cpfNumber, "CPF inválido").required("*Campo obrigatório"),

View File

@ -0,0 +1,6 @@
import * as Yup from "yup";
export default Yup.object().shape({
// Newsletter
Email: Yup.string().email("E-mail inválido"),
});