From d2c104ff51701ce4664b6fc2de46afc8d8168d5e Mon Sep 17 00:00:00 2001 From: MateusLopes Date: Tue, 17 Jan 2023 21:29:42 -0300 Subject: [PATCH] feat: add pastas de acordo com tamanho do componente --- package-lock.json | 61 ++++++ package.json | 1 + src/components/Atomo/Link | 0 src/components/Large/Footer/Footer.tsx | 151 +++++++++++++++ .../Footer}/assets/icon-facebook.svg | 0 .../Footer}/assets/icon-instagram.svg | 0 .../Footer}/assets/icon-linkedin.svg | 0 .../Footer}/assets/icon-m3.png | Bin .../Footer}/assets/icon-twitter.svg | 0 .../Footer}/assets/icon-youtube.svg | 0 .../Footer}/assets/logo-boleto.png | Bin .../Footer}/assets/logo-diners.png | Bin .../Footer}/assets/logo-elo.png | Bin .../Footer}/assets/logo-hiper.png | Bin .../Footer}/assets/logo-master.png | Bin .../Footer}/assets/logo-pagseguro.png | Bin .../Footer}/assets/logo-visa.png | Bin .../Footer}/assets/logo-vtex-pci-200.png | Bin .../Footer}/assets/logo-vtex.png | Bin .../Footer/footer.module.scss} | 92 ++++----- .../{form => Large/Form}/ContactForm.tsx | 6 +- .../{form => Large/Form}/contactForm.scss | 35 +++- src/components/Large/Header/Header.tsx | 52 ++++++ .../Header}/assets/icon-cart.svg | 0 .../Header}/assets/icon-close.svg | 0 .../Header}/assets/icon-lupa.svg | 0 .../Header}/assets/icon-menu.svg | 0 .../Header}/assets/logo-m3-academy.png | Bin .../Header/header.module.scss} | 31 ++- src/components/Large/Main/Main.tsx | 71 +++++++ .../Main}/assets/icon-arrow-right.svg | 0 .../{main => Large/Main}/assets/icon-home.svg | 0 .../main.scss => Large/Main/main.module.scss} | 5 +- src/components/Medium/FooterMenu.module.scss | 36 ++++ src/components/Medium/FooterMenu.tsx | 37 ++++ .../Small/BackToTopAndWhatsapp.module.scss | 56 ++++++ src/components/Small/BackToTopAndWhatsapp.tsx | 41 ++++ src/components/Small/LinkLi.tsx | 22 +++ .../Small/assets/icon-back-to-top.svg | 4 + src/components/Small/assets/icon-whatsapp.svg | 11 ++ src/components/footer/Footer.tsx | 176 ------------------ src/components/footer/FooterMenu.tsx | 35 ---- src/components/header/Header.tsx | 56 ------ src/components/main/Main.tsx | 53 ------ src/global.scss | 15 +- src/index.tsx | 4 +- src/pages/App.tsx | 15 -- src/pages/Institucional.tsx | 15 ++ src/pages/{app.scss => institucional.scss} | 0 src/react-app-env.d.ts | 2 + 50 files changed, 683 insertions(+), 400 deletions(-) delete mode 100644 src/components/Atomo/Link create mode 100644 src/components/Large/Footer/Footer.tsx rename src/components/{footer => Large/Footer}/assets/icon-facebook.svg (100%) rename src/components/{footer => Large/Footer}/assets/icon-instagram.svg (100%) rename src/components/{footer => Large/Footer}/assets/icon-linkedin.svg (100%) rename src/components/{footer => Large/Footer}/assets/icon-m3.png (100%) rename src/components/{footer => Large/Footer}/assets/icon-twitter.svg (100%) rename src/components/{footer => Large/Footer}/assets/icon-youtube.svg (100%) rename src/components/{footer => Large/Footer}/assets/logo-boleto.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-diners.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-elo.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-hiper.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-master.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-pagseguro.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-visa.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-vtex-pci-200.png (100%) rename src/components/{footer => Large/Footer}/assets/logo-vtex.png (100%) rename src/components/{footer/footer.scss => Large/Footer/footer.module.scss} (87%) rename src/components/{form => Large/Form}/ContactForm.tsx (94%) rename src/components/{form => Large/Form}/contactForm.scss (69%) create mode 100644 src/components/Large/Header/Header.tsx rename src/components/{header => Large/Header}/assets/icon-cart.svg (100%) rename src/components/{header => Large/Header}/assets/icon-close.svg (100%) rename src/components/{header => Large/Header}/assets/icon-lupa.svg (100%) rename src/components/{header => Large/Header}/assets/icon-menu.svg (100%) rename src/components/{header => Large/Header}/assets/logo-m3-academy.png (100%) rename src/components/{header/header.scss => Large/Header/header.module.scss} (91%) create mode 100644 src/components/Large/Main/Main.tsx rename src/components/{main => Large/Main}/assets/icon-arrow-right.svg (100%) rename src/components/{main => Large/Main}/assets/icon-home.svg (100%) rename src/components/{main/main.scss => Large/Main/main.module.scss} (98%) create mode 100644 src/components/Medium/FooterMenu.module.scss create mode 100644 src/components/Medium/FooterMenu.tsx create mode 100644 src/components/Small/BackToTopAndWhatsapp.module.scss create mode 100644 src/components/Small/BackToTopAndWhatsapp.tsx create mode 100644 src/components/Small/LinkLi.tsx create mode 100644 src/components/Small/assets/icon-back-to-top.svg create mode 100644 src/components/Small/assets/icon-whatsapp.svg delete mode 100644 src/components/footer/Footer.tsx delete mode 100644 src/components/footer/FooterMenu.tsx delete mode 100644 src/components/header/Header.tsx delete mode 100644 src/components/main/Main.tsx delete mode 100644 src/pages/App.tsx create mode 100644 src/pages/Institucional.tsx rename src/pages/{app.scss => institucional.scss} (100%) diff --git a/package-lock.json b/package-lock.json index 2760501..2b9d5bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "formik": "^2.2.9", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.6.2", "react-scripts": "5.0.1", "typescript": "^4.9.4", "web-vitals": "^2.1.4", @@ -3079,6 +3080,14 @@ } } }, + "node_modules/@remix-run/router": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz", + "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==", + "engines": { + "node": ">=14" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -14026,6 +14035,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz", + "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==", + "dependencies": { + "@remix-run/router": "1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz", + "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==", + "dependencies": { + "@remix-run/router": "1.2.1", + "react-router": "6.6.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -18962,6 +19001,11 @@ "source-map": "^0.7.3" } }, + "@remix-run/router": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz", + "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==" + }, "@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -26774,6 +26818,23 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" }, + "react-router": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz", + "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==", + "requires": { + "@remix-run/router": "1.2.1" + } + }, + "react-router-dom": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz", + "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==", + "requires": { + "@remix-run/router": "1.2.1", + "react-router": "6.6.2" + } + }, "react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 523f3fc..3cd7275 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "formik": "^2.2.9", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.6.2", "react-scripts": "5.0.1", "typescript": "^4.9.4", "web-vitals": "^2.1.4", diff --git a/src/components/Atomo/Link b/src/components/Atomo/Link deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/Large/Footer/Footer.tsx b/src/components/Large/Footer/Footer.tsx new file mode 100644 index 0000000..cb26c3b --- /dev/null +++ b/src/components/Large/Footer/Footer.tsx @@ -0,0 +1,151 @@ +import React from "react" +import iconFacebook from "./assets/icon-facebook.svg" +import iconInstagram from "./assets/icon-instagram.svg" +import iconTwitter from "./assets/icon-twitter.svg" +import iconYoutube from "./assets/icon-youtube.svg" +import iconLinkedin from "./assets/icon-linkedin.svg" +import iconM3 from "./assets/icon-m3.png" +import logoBoleto from "./assets/logo-boleto.png" +import logoDiners from "./assets/logo-diners.png" +import logoElo from "./assets/logo-elo.png" +import logoHiper from "./assets/logo-hiper.png" +import logoMaster from "./assets/logo-master.png" +import logoPagseguro from "./assets/logo-pagseguro.png" +import logoVisa from "./assets/logo-visa.png" +import logoVtexPci from "./assets/logo-vtex-pci-200.png" +import logoVtex from "./assets/logo-vtex.png" +import { FooterMenu } from "../../Medium/FooterMenu" +import { LinkLi } from "../../Small/LinkLi" +import styles from "./footer.module.scss"; + +const Footer = () => { + const menuListData = [ + { + title: "Institucional", + content1: `Quem Somos`, + content2: `Política de Privacidade`, + content3: `Segurança`, + content4: `Seja um Revendedor`, + }, + { + title: "Dúvidas", + content1: `Entrega`, + content2: `Pagamento`, + content3: `Trocas e Devoluções`, + content4: `Dúvidas Frequentes`, + }, + { + title: "Fale Conosco", + content1: `Atendimento ao Consumidor`, + content2: `(11) 4159 9504`, + content3: `Atendimento Online`, + content4: `(11) 99433-8825`, + } +] + + return ( + + ) + +} + +export { Footer } \ No newline at end of file diff --git a/src/components/footer/assets/icon-facebook.svg b/src/components/Large/Footer/assets/icon-facebook.svg similarity index 100% rename from src/components/footer/assets/icon-facebook.svg rename to src/components/Large/Footer/assets/icon-facebook.svg diff --git a/src/components/footer/assets/icon-instagram.svg b/src/components/Large/Footer/assets/icon-instagram.svg similarity index 100% rename from src/components/footer/assets/icon-instagram.svg rename to src/components/Large/Footer/assets/icon-instagram.svg diff --git a/src/components/footer/assets/icon-linkedin.svg b/src/components/Large/Footer/assets/icon-linkedin.svg similarity index 100% rename from src/components/footer/assets/icon-linkedin.svg rename to src/components/Large/Footer/assets/icon-linkedin.svg diff --git a/src/components/footer/assets/icon-m3.png b/src/components/Large/Footer/assets/icon-m3.png similarity index 100% rename from src/components/footer/assets/icon-m3.png rename to src/components/Large/Footer/assets/icon-m3.png diff --git a/src/components/footer/assets/icon-twitter.svg b/src/components/Large/Footer/assets/icon-twitter.svg similarity index 100% rename from src/components/footer/assets/icon-twitter.svg rename to src/components/Large/Footer/assets/icon-twitter.svg diff --git a/src/components/footer/assets/icon-youtube.svg b/src/components/Large/Footer/assets/icon-youtube.svg similarity index 100% rename from src/components/footer/assets/icon-youtube.svg rename to src/components/Large/Footer/assets/icon-youtube.svg diff --git a/src/components/footer/assets/logo-boleto.png b/src/components/Large/Footer/assets/logo-boleto.png similarity index 100% rename from src/components/footer/assets/logo-boleto.png rename to src/components/Large/Footer/assets/logo-boleto.png diff --git a/src/components/footer/assets/logo-diners.png b/src/components/Large/Footer/assets/logo-diners.png similarity index 100% rename from src/components/footer/assets/logo-diners.png rename to src/components/Large/Footer/assets/logo-diners.png diff --git a/src/components/footer/assets/logo-elo.png b/src/components/Large/Footer/assets/logo-elo.png similarity index 100% rename from src/components/footer/assets/logo-elo.png rename to src/components/Large/Footer/assets/logo-elo.png diff --git a/src/components/footer/assets/logo-hiper.png b/src/components/Large/Footer/assets/logo-hiper.png similarity index 100% rename from src/components/footer/assets/logo-hiper.png rename to src/components/Large/Footer/assets/logo-hiper.png diff --git a/src/components/footer/assets/logo-master.png b/src/components/Large/Footer/assets/logo-master.png similarity index 100% rename from src/components/footer/assets/logo-master.png rename to src/components/Large/Footer/assets/logo-master.png diff --git a/src/components/footer/assets/logo-pagseguro.png b/src/components/Large/Footer/assets/logo-pagseguro.png similarity index 100% rename from src/components/footer/assets/logo-pagseguro.png rename to src/components/Large/Footer/assets/logo-pagseguro.png diff --git a/src/components/footer/assets/logo-visa.png b/src/components/Large/Footer/assets/logo-visa.png similarity index 100% rename from src/components/footer/assets/logo-visa.png rename to src/components/Large/Footer/assets/logo-visa.png diff --git a/src/components/footer/assets/logo-vtex-pci-200.png b/src/components/Large/Footer/assets/logo-vtex-pci-200.png similarity index 100% rename from src/components/footer/assets/logo-vtex-pci-200.png rename to src/components/Large/Footer/assets/logo-vtex-pci-200.png diff --git a/src/components/footer/assets/logo-vtex.png b/src/components/Large/Footer/assets/logo-vtex.png similarity index 100% rename from src/components/footer/assets/logo-vtex.png rename to src/components/Large/Footer/assets/logo-vtex.png diff --git a/src/components/footer/footer.scss b/src/components/Large/Footer/footer.module.scss similarity index 87% rename from src/components/footer/footer.scss rename to src/components/Large/Footer/footer.module.scss index 2926868..c5bd51c 100644 --- a/src/components/footer/footer.scss +++ b/src/components/Large/Footer/footer.module.scss @@ -1,3 +1,5 @@ +@import "../../../global.scss"; + footer { .newsletter-wrapper { display: flex; @@ -37,6 +39,9 @@ footer { } .second-wrapper { + display: flex; + gap: 8px; + @media (max-width: 1024px) { display: flex; flex-direction: column; @@ -103,7 +108,6 @@ footer { line-height: 14px; text-align: center; letter-spacing: 0.05em; - margin-left: 8px; @media (min-width: 2500px) { width: 246px; @@ -148,40 +152,6 @@ footer { gap: 12px; margin-bottom: 12px; - .footer-menu-item { - display: flex; - flex-direction: column; - gap: 12px; - - .footer-menu-title { - display: flex; - justify-content: space-between; - font-family: $font-family-Roboto; - font-weight: 500; - font-size: 14px; - line-height: 16px; - color: $color-gray-200; - - .close-open-menu { - font-size: 17px; - } - } - - .footer-menu-content { - cursor: pointer; - font-family: $font-family-Roboto; - font-weight: 400; - font-size: 12px; - line-height: 14px; - text-transform: capitalize; - color: $color-gray-200; - - &:last-child { - text-decoration: underline; - } - } - } - #FaleConosco li:nth-child(2), #FaleConosco li:nth-child(4) { font-weight: 500; @@ -235,9 +205,18 @@ footer { font-size: 24px; line-height: 28px; } + } - &.bold { - font-weight: 500; + li.bold { + font-family: $font-family-Roboto; + font-size: 12px; + line-height: 14px; + color: $color-gray-200; + font-weight: 500; + + @media (min-width: 2500px) { + font-size: 24px; + line-height: 28px; } } @@ -337,7 +316,7 @@ footer { } @media (max-width: 375px) { - gap: 11px; + gap: 3.2%; } .line { @@ -357,18 +336,45 @@ footer { } @media (max-width: 1024px) { + &.logoMaster, + &.logoBoleto { + width: 3.63%; + } + + &.logoVisa, + &.logoDiners, + &.logoHiper { + width: 3.529%; + } + + &.logoElo { + width: 3.73%; + } + + &.logoPagseguro { + width: 3.428%; + } + &:last-child { - width: 54.61px; + width: 5.505%; } } @media (max-width: 375px) { - width: 30px; - height: 17px; + &.logoMaster, + &.logoBoleto, + &.logoVisa, + &.logoDiners, + &.logoHiper, + &.logoElo, + &.logoPagseguro { + width: 8.75%; + height: auto; + } &:last-child { - width: 45px; - height: 28px; + width: 13.12%; + height: auto; } } } diff --git a/src/components/form/ContactForm.tsx b/src/components/Large/Form/ContactForm.tsx similarity index 94% rename from src/components/form/ContactForm.tsx rename to src/components/Large/Form/ContactForm.tsx index f95e65c..d710f88 100644 --- a/src/components/form/ContactForm.tsx +++ b/src/components/Large/Form/ContactForm.tsx @@ -1,5 +1,5 @@ import { Formik, Form, Field, ErrorMessage } from "formik" -import FormSchema from '../../schema/FormSchema'; +import FormSchema from '../../../schema/FormSchema'; interface IFormikValues{ name: string; @@ -43,7 +43,7 @@ const ContactForm = () => { initialValues={initialValues} validationSchema={FormSchema} > -
+
@@ -78,7 +78,7 @@ const ContactForm = () => { * - +
diff --git a/src/components/form/contactForm.scss b/src/components/Large/Form/contactForm.scss similarity index 69% rename from src/components/form/contactForm.scss rename to src/components/Large/Form/contactForm.scss index 8f1f0ec..434d917 100644 --- a/src/components/form/contactForm.scss +++ b/src/components/Large/Form/contactForm.scss @@ -1,4 +1,4 @@ -form { +.contact-form { display: flex; flex-direction: column; gap: 12px; @@ -27,6 +27,7 @@ form { border: solid 1px $color-black-200; padding: 15px 20px; font-family: $font-family-Roboto; + color: $color-gray-600; font-weight: 400; font-size: 14px; line-height: 16px; @@ -67,6 +68,11 @@ form { @media (max-width: 1024px) { padding-right: 32px; } + + @media (min-width: 2500px) { + font-size: 24px; + line-height: 28px; + } } } @@ -99,9 +105,31 @@ form { font-size: 28px; line-height: 33px; } + + .checkbox-custom { + cursor: pointer; + appearance: none; + border: 1px solid $color-black; + width: 18.64px; + height: 18px; + border-radius: 3px; + + @media (min-width: 2500px) { + width: 36.4px; + height: 35px; + } + + &:checked { + background-image: url("data:image/svg+xml,%3Csvg width='26' height='20' viewBox='0 0 26 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.42323 18.9338L1.29823 10.8088C0.810095 10.3207 0.810095 9.5292 1.29823 9.04101L3.06595 7.27324C3.55409 6.78506 4.34559 6.78506 4.83373 7.27324L10.3071 12.7466L22.0305 1.02324C22.5186 0.535105 23.3101 0.535105 23.7983 1.02324L25.566 2.79101C26.0541 3.27915 26.0541 4.0706 25.566 4.55879L11.191 18.9338C10.7028 19.422 9.91137 19.422 9.42323 18.9338V18.9338Z' fill='black'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-size: contain; + background-position: center; + } + } } .form-submit-btn { + width: 100%; cursor: pointer; border: none; border-radius: 25px; @@ -128,5 +156,10 @@ form { font-weight: 400; font-size: 12px; line-height: 14px; + + @media (min-width: 2500px) { + font-size: 24px; + line-height: 28px; + } } } diff --git a/src/components/Large/Header/Header.tsx b/src/components/Large/Header/Header.tsx new file mode 100644 index 0000000..db108c3 --- /dev/null +++ b/src/components/Large/Header/Header.tsx @@ -0,0 +1,52 @@ +import { useState } from 'react' +import iconCart from './assets/icon-cart.svg'; +import iconLupa from './assets/icon-lupa.svg'; +import iconMenu from './assets/icon-menu.svg'; +import iconClose from './assets/icon-close.svg'; +import logoM3Academy from './assets//logo-m3-academy.png'; +import { LinkLi } from '../../Small/LinkLi'; +import styles from './header.module.scss'; + +const Header = () => { + const [active, setMode] = useState(false); + const ToggleMode = () => { + setMode(!active) + } + + return ( +
+
+ + + Logo M3 Academy + +
+ + Icone de pesquisar +
+
+ + + +
+
+ +
+ ) +} + +export { Header } \ No newline at end of file diff --git a/src/components/header/assets/icon-cart.svg b/src/components/Large/Header/assets/icon-cart.svg similarity index 100% rename from src/components/header/assets/icon-cart.svg rename to src/components/Large/Header/assets/icon-cart.svg diff --git a/src/components/header/assets/icon-close.svg b/src/components/Large/Header/assets/icon-close.svg similarity index 100% rename from src/components/header/assets/icon-close.svg rename to src/components/Large/Header/assets/icon-close.svg diff --git a/src/components/header/assets/icon-lupa.svg b/src/components/Large/Header/assets/icon-lupa.svg similarity index 100% rename from src/components/header/assets/icon-lupa.svg rename to src/components/Large/Header/assets/icon-lupa.svg diff --git a/src/components/header/assets/icon-menu.svg b/src/components/Large/Header/assets/icon-menu.svg similarity index 100% rename from src/components/header/assets/icon-menu.svg rename to src/components/Large/Header/assets/icon-menu.svg diff --git a/src/components/header/assets/logo-m3-academy.png b/src/components/Large/Header/assets/logo-m3-academy.png similarity index 100% rename from src/components/header/assets/logo-m3-academy.png rename to src/components/Large/Header/assets/logo-m3-academy.png diff --git a/src/components/header/header.scss b/src/components/Large/Header/header.module.scss similarity index 91% rename from src/components/header/header.scss rename to src/components/Large/Header/header.module.scss index 38ce556..43cfe7a 100644 --- a/src/components/header/header.scss +++ b/src/components/Large/Header/header.module.scss @@ -1,11 +1,14 @@ +@import "../../../global.scss"; + header { - .header-wrapper, .navbar { display: flex; align-items: center; } .header-wrapper { + display: flex; + align-items: center; background-color: $color-black; padding: 22px 100px; border-bottom: solid 1px $color-gray-600; @@ -33,6 +36,11 @@ header { width: 136px; height: 25.86px; + img { + width: 136px; + height: 25.86px; + } + @media (max-width: 1024px) { grid-area: logo; margin: 0 auto; @@ -41,6 +49,11 @@ header { @media (min-width: 2500px) { width: 265.62px; height: 50.5px; + + img { + width: 265.62px; + height: 50.5px; + } } } @@ -144,6 +157,13 @@ header { } .icon-cart { + width: 28px; + height: 28px; + + img { + width: 100%; + } + @media (min-width: 2500px) { height: 54.68px; width: 54.68px; @@ -196,6 +216,7 @@ header { width: 0; .menu { + z-index: 2; position: fixed; top: 0; bottom: 0; @@ -204,6 +225,7 @@ header { background: $blur-gray; ul { + z-index: 3; flex-direction: column; align-items: flex-start; gap: 12px; @@ -228,7 +250,7 @@ header { margin-right: 36px; top: 0; left: 0; - z-index: 1; + z-index: 3; width: -webkit-fill-available; background: black; padding: 31px 16px 31px 16px; @@ -237,7 +259,7 @@ header { .btn-close { display: block; position: fixed; - z-index: 1; + z-index: 3; width: 15px; height: 15px; right: 52px; @@ -246,7 +268,7 @@ header { } } -/* clears the ‘X’ from Internet Explorer */ +/* Tirando o X da barra de pesquisa */ input[type="search"]::-ms-clear { display: none; width: 0; @@ -257,7 +279,6 @@ input[type="search"]::-ms-reveal { width: 0; height: 0; } -/* clears the ‘X’ from Chrome */ input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-results-button, diff --git a/src/components/Large/Main/Main.tsx b/src/components/Large/Main/Main.tsx new file mode 100644 index 0000000..63ce90c --- /dev/null +++ b/src/components/Large/Main/Main.tsx @@ -0,0 +1,71 @@ +import { useState } from "react" +import { BrowserRouter as Router, Link } from 'react-router-dom' +import { ContactForm } from "../Form/ContactForm"; +import { BackToTopAndWhatsapp } from "../../Small/BackToTopAndWhatsapp"; + +import iconHome from "./assets/icon-home.svg"; +import iconArrowRight from "./assets/icon-arrow-right.svg" +import styles from "./main.module.scss"; + +const Main = () => { + let [isActive, setIsActive] = useState(false); + + return ( +
+
+ Icone de casa + Seta para direita +
Institucional
+
+ +

+ Institucional +

+ +
+
    + +
  • setIsActive(isActive = false)} className={isActive ? "" : styles["active-li"]}> + Sobre +
  • +
  • + Forma de Pagamento +
  • +
  • + Entrega +
  • +
  • + Troca e Devolução +
  • +
  • + Segurança e Privacidade +
  • +
  • setIsActive(isActive = true)} className={isActive ? styles["active-li"] : ""}> + Contato +
  • +
    +
+ +
+

Sobre

+
+

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.

+
+

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.

+
+

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?

+
+
+ +
+

Preencha o formulário

+ +
+
+ + +
+ ) +} + +export { Main } \ No newline at end of file diff --git a/src/components/main/assets/icon-arrow-right.svg b/src/components/Large/Main/assets/icon-arrow-right.svg similarity index 100% rename from src/components/main/assets/icon-arrow-right.svg rename to src/components/Large/Main/assets/icon-arrow-right.svg diff --git a/src/components/main/assets/icon-home.svg b/src/components/Large/Main/assets/icon-home.svg similarity index 100% rename from src/components/main/assets/icon-home.svg rename to src/components/Large/Main/assets/icon-home.svg diff --git a/src/components/main/main.scss b/src/components/Large/Main/main.module.scss similarity index 98% rename from src/components/main/main.scss rename to src/components/Large/Main/main.module.scss index ce5deb7..05d4783 100644 --- a/src/components/main/main.scss +++ b/src/components/Large/Main/main.module.scss @@ -1,4 +1,6 @@ -.main { +@import "../../../global.scss"; + +main { padding: 29px 100px 70px 100px; @media (max-width: 1024px) { @@ -83,6 +85,7 @@ } li { + cursor: pointer; font-family: $font-family-Roboto; color: $color-gray-350; font-weight: 400; diff --git a/src/components/Medium/FooterMenu.module.scss b/src/components/Medium/FooterMenu.module.scss new file mode 100644 index 0000000..01a65ad --- /dev/null +++ b/src/components/Medium/FooterMenu.module.scss @@ -0,0 +1,36 @@ +@import "../../global.scss"; + +.footer-menu-item { + display: flex; + flex-direction: column; + gap: 12px; + + .footer-menu-title { + cursor: pointer; + display: flex; + justify-content: space-between; + font-family: $font-family-Roboto; + font-weight: 500; + font-size: 14px; + line-height: 16px; + color: $color-gray-200; + + .close-open-menu { + font-size: 17px; + } + } + + .footer-menu-content { + cursor: pointer; + font-family: $font-family-Roboto; + font-weight: 400; + font-size: 12px; + line-height: 14px; + text-transform: capitalize; + color: $color-gray-200; + + &:last-child { + text-decoration: underline; + } + } +} diff --git a/src/components/Medium/FooterMenu.tsx b/src/components/Medium/FooterMenu.tsx new file mode 100644 index 0000000..91ce5a1 --- /dev/null +++ b/src/components/Medium/FooterMenu.tsx @@ -0,0 +1,37 @@ +import React, { useState } from 'react' +import { LinkLi } from '../Small/LinkLi'; +import styles from './FooterMenu.module.scss' + +interface footerMenuProps{ + title: string; + content1: string; + content2: string; + content3: string; + content4: string; +} + +const FooterMenu = (props: footerMenuProps) => { + const [isActive, setIsActive] = useState(false) + + return ( +
+
setIsActive(!isActive)} + > +
{props.title}
+
{isActive ? '-' : '+'}
+
+ {isActive && ( + <> + + + + + + )} +
+ ) +} + +export { FooterMenu } diff --git a/src/components/Small/BackToTopAndWhatsapp.module.scss b/src/components/Small/BackToTopAndWhatsapp.module.scss new file mode 100644 index 0000000..1740a02 --- /dev/null +++ b/src/components/Small/BackToTopAndWhatsapp.module.scss @@ -0,0 +1,56 @@ +.back-to-top { + z-index: 1; + position: fixed; + bottom: 190px; + right: 16px; + width: 34px; + height: 34px; + cursor: pointer; + background: none; + border: none; + + img { + width: 100%; + } + + @media (min-width: 2500px) { + bottom: 229.24px; + width: 66px; + height: 66px; + } + + @media (max-width: 1024px) { + bottom: 21px; + } + + @media (max-width: 375px) { + bottom: 16px; + } +} + +.whatsapp { + position: fixed; + z-index: 1; + bottom: 229px; + right: 16px; + width: 34px; + height: 34px; + + img { + width: 100%; + } + + @media (min-width: 2500px) { + bottom: 300.24px; + width: 66px; + height: 66px; + } + + @media (max-width: 1024px) { + bottom: 60px; + } + + @media (max-width: 375px) { + bottom: 55px; + } +} diff --git a/src/components/Small/BackToTopAndWhatsapp.tsx b/src/components/Small/BackToTopAndWhatsapp.tsx new file mode 100644 index 0000000..a8932a8 --- /dev/null +++ b/src/components/Small/BackToTopAndWhatsapp.tsx @@ -0,0 +1,41 @@ +import React from 'react' +import { useEffect, useState } from "react"; +import iconWhatsapp from './assets/icon-whatsapp.svg'; +import iconBackToTop from './assets/icon-back-to-top.svg'; +import styles from './BackToTopAndWhatsapp.module.scss'; + +const BackToTopAndWhatsapp = () => { + const [showButton, setShowButton] = useState(false); + + useEffect(() => { + window.addEventListener("scroll", () => { + if (window.pageYOffset > 150) { + setShowButton(true); + } else { + setShowButton(false); + } + }); + }, []); + + const scrollToTop = () => { + window.scrollTo({ + top: 0, + behavior: 'smooth' + }); + }; + + return ( +
+ {showButton && ( + + )} + + Icone para entrar em contato através do Whatsapp + +
+ ) +} + +export { BackToTopAndWhatsapp } diff --git a/src/components/Small/LinkLi.tsx b/src/components/Small/LinkLi.tsx new file mode 100644 index 0000000..5b53ea0 --- /dev/null +++ b/src/components/Small/LinkLi.tsx @@ -0,0 +1,22 @@ +import React from 'react' + +interface linkLiProps{ + href: string; + className?: string; + classNameLi?: string; + content: string; +} + +const LinkLi = (props: linkLiProps) => { + const { href, className, classNameLi, content } = props + + return ( +
  • + + {content} + +
  • + ) +} + +export { LinkLi } \ No newline at end of file diff --git a/src/components/Small/assets/icon-back-to-top.svg b/src/components/Small/assets/icon-back-to-top.svg new file mode 100644 index 0000000..adb26a4 --- /dev/null +++ b/src/components/Small/assets/icon-back-to-top.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/Small/assets/icon-whatsapp.svg b/src/components/Small/assets/icon-whatsapp.svg new file mode 100644 index 0000000..405da74 --- /dev/null +++ b/src/components/Small/assets/icon-whatsapp.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/components/footer/Footer.tsx b/src/components/footer/Footer.tsx deleted file mode 100644 index 0fdb8dc..0000000 --- a/src/components/footer/Footer.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import React from 'react' -import FooterMenu from './FooterMenu' -import iconFacebook from './assets/icon-facebook.svg' -import iconInstagram from './assets/icon-instagram.svg' -import iconTwitter from './assets/icon-twitter.svg' -import iconYoutube from './assets/icon-youtube.svg' -import iconLinkedin from './assets/icon-linkedin.svg' -import iconM3 from './assets/icon-m3.png' -import logoBoleto from './assets/logo-boleto.png' -import logoDiners from './assets/logo-diners.png' -import logoElo from './assets/logo-elo.png' -import logoHiper from './assets/logo-hiper.png' -import logoMaster from './assets/logo-master.png' -import logoPagseguro from './assets/logo-pagseguro.png' -import logoVisa from './assets/logo-visa.png' -import logoVtexPci from './assets/logo-vtex-pci-200.png' -import logoVtex from './assets/logo-vtex.png' - -const Footer = () => { - const menuListData = [ - { - title: 'Institucional', - content1: `Quem Somos`, - content2: `Política de Privacidade`, - content3: `Segurança`, - content4: `Seja um Revendedor`, - }, - { - title: 'Dúvidas', - content1: `Entrega`, - content2: `Pagamento`, - content3: `Trocas e Devoluções`, - content4: `Dúvidas Frequentes`, - }, - { - title: 'Fale Conosco', - content1: `Atendimento ao Consumidor`, - content2: `(11) 4159 9504`, - content3: `Atendimento Online`, - content4: `(11) 99433-8825`, - } - ] - - return ( -
    - ) - -} - -export { Footer } \ No newline at end of file diff --git a/src/components/footer/FooterMenu.tsx b/src/components/footer/FooterMenu.tsx deleted file mode 100644 index 49edb36..0000000 --- a/src/components/footer/FooterMenu.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React, { useState } from 'react' - -interface footerMenuProps{ - title: string; - content1: string; - content2: string; - content3: string; - content4: string; -} - -const FooterMenu = (props: footerMenuProps) => { - const [isActive, setIsActive] = useState(false) - - return ( -
    -
    setIsActive(!isActive)} - > -
    {props.title}
    -
    {isActive ? '-' : '+'}
    -
    - {isActive && ( - <> -
  • {props.content1}
  • -
  • {props.content2}
  • -
  • {props.content3}
  • -
  • {props.content4}
  • - - )} -
    - ) -} - -export default FooterMenu diff --git a/src/components/header/Header.tsx b/src/components/header/Header.tsx deleted file mode 100644 index 0dfff25..0000000 --- a/src/components/header/Header.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useState } from 'react' -import iconCart from './assets/icon-cart.svg'; -import iconLupa from './assets/icon-lupa.svg'; -import iconMenu from './assets/icon-menu.svg'; -import iconClose from './assets/icon-close.svg'; -import logoM3Academy from './assets//logo-m3-academy.png'; - -const Header = () => { - const [active, setMode] = useState(false); - const ToggleMode = () => { - setMode(!active) - } - - return ( -
    -
    - - - Logo M3 Academy - -
    - - Icone de lupa -
    -
    - - - -
    -
    - -
    - ) -} - -export { Header } \ No newline at end of file diff --git a/src/components/main/Main.tsx b/src/components/main/Main.tsx deleted file mode 100644 index 5f76a4d..0000000 --- a/src/components/main/Main.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useState } from 'react' -import iconHome from './assets/icon-home.svg'; -import iconArrowRight from './assets/icon-arrow-right.svg' -import { ContactForm } from "../../components/form/ContactForm"; - -const Main = () => { - let [isActive, setIsActive] = useState(false); - - return ( -
    -
    -
    - Icone de casa - Seta para direita -
    Institucional
    -
    - -

    - Institucional -

    - -
    -
      -
    • setIsActive(isActive = false)} className={isActive ? "" : "active-li"}>Sobre
    • -
    • Forma de Pagamento
    • -
    • Entrega
    • -
    • Troca e Devolução
    • -
    • Segurança e Privacidade
    • -
    • setIsActive(isActive = true)} className={isActive ? "active-li" : ""}>Contato
    • -
    - -
    -

    Sobre

    -
    -

    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.

    -
    -

    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.

    -
    -

    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?

    -
    -
    - -
    -

    Preencha o formulário

    - -
    -
    -
    -
    - ) -} - -export { Main } \ No newline at end of file diff --git a/src/global.scss b/src/global.scss index 40bded7..96dbb3a 100644 --- a/src/global.scss +++ b/src/global.scss @@ -1,6 +1,5 @@ // Font @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"); - $font-family-Roboto: "Roboto", sans-serif; // Colors @@ -17,7 +16,6 @@ $color-gray-600: #c4c4c4; $color-gray-650: #e5e5e5; $color-gray-700: #f2f2f2; $color-gray-800: #f9f9f9; - $blur-gray: rgba(69, 69, 69, 0.7); $color-white: #fff; @@ -28,6 +26,7 @@ $color-blue: #5200ff; $color-green: #008000; +//Reset CSS * { padding: 0; margin: 0; @@ -36,13 +35,14 @@ $color-green: #008000; a { text-decoration: none; + color: unset; } li { list-style-type: none; } -.btn { +button { cursor: pointer; background: none; border: none; @@ -51,10 +51,5 @@ li { } // Pages -@import "./pages/app.scss"; - -// Components -@import "./components/header/header.scss"; -@import "./components/main/main.scss"; -@import "./components/form/contactForm.scss"; -@import "./components/footer/footer.scss"; +@import "./pages/institucional.scss"; +@import "./components/Large/Form/contactForm.scss"; diff --git a/src/index.tsx b/src/index.tsx index a25970f..9fefd2c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,12 +1,12 @@ import './global.scss' import React from 'react'; import ReactDOM from 'react-dom/client'; -import App from './pages/App'; +import Institucional from './pages/Institucional'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( - + ); diff --git a/src/pages/App.tsx b/src/pages/App.tsx deleted file mode 100644 index f60f5a4..0000000 --- a/src/pages/App.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Header } from "../components/header/Header"; -import { Footer } from "../components/footer/Footer"; -import { Main } from "../components/main/Main"; - -function App() { - return ( -
    -
    -
    -
    -
    - ); -} - -export default App; diff --git a/src/pages/Institucional.tsx b/src/pages/Institucional.tsx new file mode 100644 index 0000000..169fe76 --- /dev/null +++ b/src/pages/Institucional.tsx @@ -0,0 +1,15 @@ +import { Header } from "../components/Large/Header/Header"; +import { Footer } from "../components/Large/Footer/Footer"; +import { Main } from "../components/Large/Main/Main"; + +function App() { + return ( +
    +
    +
    +
    + ); +} + +export default App; diff --git a/src/pages/app.scss b/src/pages/institucional.scss similarity index 100% rename from src/pages/app.scss rename to src/pages/institucional.scss diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts index 0357e4f..17f58af 100644 --- a/src/react-app-env.d.ts +++ b/src/react-app-env.d.ts @@ -2,3 +2,5 @@ declare module "*.png"; declare module "*.svg"; declare module "*.jpeg"; declare module "*.jpg"; +declare module "*.css"; +declare module "*.scss";