diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index 8548d89..70ac755 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -2,11 +2,19 @@ header { width: 100%; background-color: black; + .menu-open { + display: block; + } + + .menu-closed { + display: none; + } + .header-top { display: flex; align-items: center; justify-content: space-between; - padding: 25px 100px; + padding: 22px 100px; border-bottom: 1px solid #c4c4c4; figure { margin: 0; @@ -16,23 +24,47 @@ header { width: 100%; height: 100%; } + + .hamburguer { + display: none; + } + .logo { height: 26px; width: 136px; } .search-bar { - height: 32px; width: 264px; display: flex; align-items: center; + input::-webkit-input-placeholder, + textarea::-webkit-input-placeholder { + color: #c4c4c4; + } + .search-bar-input { width: 100%; background: #ffffff; border: 2px solid #f0f0f0; border-radius: 5px; - padding: 12px 16px; + padding: 10px 16px; + border: 2px solid #f0f0f0; + + background-image: url(./assets/lupa.svg); + background-position: center right 16px; + background-repeat: no-repeat; + background-size: 18px; + font-family: "Roboto"; + font-style: normal; + font-weight: 400; + font-size: 14px; + line-height: 16px; + + /* primary-500 */ + + color: #c6c6c6; } } @@ -79,3 +111,166 @@ header { } } } +// Telas > 2500 +@media (min-width: 2500px) { + header { + .header-top { + padding: 25px 100px; + + .logo { + height: 50px; + width: 265px; + } + + .search-bar { + width: 515px; + display: flex; + align-items: center; + + input::-webkit-input-placeholder, + textarea::-webkit-input-placeholder { + color: #c4c4c4; + } + + .search-bar-input { + width: 100%; + background: #ffffff; + border: 2px solid #f0f0f0; + border-radius: 5px; + padding: 10px 16px; + border: 0; + + background-image: url(./assets/lupa.svg); + background-position: center right 16px; + background-repeat: no-repeat; + background-size: 36px; + font-size: 28px; + line-height: 33px; + color: #c4c4c4; + } + } + + .access { + .entrar { + font-size: 28px; + line-height: 33px; + } + + .shopping-cart { + height: 55px; + width: 55px; + } + } + } + + .header-bottom { + display: flex; + align-items: center; + padding: 14px 100px; + gap: 55px; + + font-size: 28px; + line-height: 33px; + } + } +} + +// Tablet < 720 +@media screen and (max-width: 1024px) { + header { + .header-top { + padding: 25px 16px; + border-bottom: 0px solid #c4c4c4; + + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: 28px 1fr; + gap: 25px 0px; + grid-template-areas: + ". . ." + "search-bar search-bar search-bar"; + + .hamburguer { + display: block; + height: 23px; + width: 28px; + justify-content: flex-start; + } + + .logo { + justify-self: center; + } + + .search-bar { + grid-area: search-bar; + width: 100%; + } + + .access { + justify-content: flex-end; + + .entrar { + display: none; + } + } + } + + .header-bottom { + display: none; + } + + // Menu Mobile + .overlay { + background: rgba(69, 69, 69, 0.7); + position: absolute; + top: 0; + height: 100%; + width: 100%; + + .side-menu { + width: 90%; + + .side-menu-top { + width: 96%; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + background-color: black; + color: #ffffff; + padding: 31px 16px; + + .entrar { + margin: 0; + font-family: "Roboto"; + font-style: normal; + font-weight: 400; + font-size: 14px; + line-height: 16px; + text-transform: uppercase; + color: #ffffff; + } + } + + .side-menu-content { + width: 100%; + height: 585px; + display: flex; + flex-direction: column; + background-color: #ffffff; + margin: 0; + list-style-type: none; + padding: 31px 16px; + gap: 12px; + font-family: "Roboto"; + font-style: normal; + font-weight: 500; + font-size: 14px; + line-height: 16px; + text-transform: uppercase; + color: #c4c4c4; + } + } + } + } +} diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index bf46b4a..b4324bb 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,14 +1,26 @@ import React from "react"; +import { useState } from "react"; import "./Header.scss"; import logo from "./assets/Logo-M3Academy.svg"; -import lupa from "./assets/lupa.svg"; import shoppingCart from "./assets/shopping-cart.svg"; +import hamburguer from "./assets/hamburguer.svg"; +import close from "./assets/close.svg"; const Header = () => { + const [active, setMode] = useState(false); + + const ToggleMenu = () => { + setMode(!active); + }; + return ( <>
+ {/* Hamburguer */} +
+ Ícone do carrinho de compras +
{/* Logo M3 Academy */}
Logo M3 Academy @@ -37,6 +49,24 @@ const Header = () => {

Saiba Mais

Institucionais

+ + {/* Menu para mobile */} +
+ +
); diff --git a/src/components/Header/assets/close.svg b/src/components/Header/assets/close.svg new file mode 100644 index 0000000..e0e6d36 --- /dev/null +++ b/src/components/Header/assets/close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/Header/assets/hamburguer.svg b/src/components/Header/assets/hamburguer.svg new file mode 100644 index 0000000..6cadeb3 --- /dev/null +++ b/src/components/Header/assets/hamburguer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/global.css b/src/global.css index ecbd796..393a0c4 100644 --- a/src/global.css +++ b/src/global.css @@ -6,6 +6,7 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; + padding: 0; } code {