feat: ajustes na configuração e header completo

This commit is contained in:
Matheus Mariosa 2023-01-19 03:20:24 -03:00
parent b65284b33d
commit 9afe9b15ea
14 changed files with 206 additions and 53 deletions

43
package-lock.json generated
View File

@ -20,6 +20,9 @@
"react-scripts": "5.0.1",
"typescript": "^4.9.4",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"sass": "^1.57.1"
}
},
"node_modules/@adobe/css-tools": {
@ -8634,6 +8637,12 @@
"url": "https://opencollective.com/immer"
}
},
"node_modules/immutable": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.2.2.tgz",
"integrity": "sha512-fTMKDwtbvO5tldky9QZ2fMX7slR0mYpY5nbnFWYp0fOzDhHqhgIw9KoYgxLWsoNTS9ZHGauHj18DTyEw6BK3Og==",
"devOptional": true
},
"node_modules/import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@ -14517,6 +14526,23 @@
"resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-13.0.0.tgz",
"integrity": "sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA=="
},
"node_modules/sass": {
"version": "1.57.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz",
"integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==",
"devOptional": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/sass-loader": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz",
@ -22986,6 +23012,12 @@
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.18.tgz",
"integrity": "sha512-eAPNpsj7Ax1q6Y/3lm2PmlwRcFzpON7HSNQ3ru5WQH1/PSpnyed/HpNOELl2CxLKoj4r+bAHgdyKqW5gc2Se1A=="
},
"immutable": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.2.2.tgz",
"integrity": "sha512-fTMKDwtbvO5tldky9QZ2fMX7slR0mYpY5nbnFWYp0fOzDhHqhgIw9KoYgxLWsoNTS9ZHGauHj18DTyEw6BK3Og==",
"devOptional": true
},
"import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@ -27033,6 +27065,17 @@
"resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-13.0.0.tgz",
"integrity": "sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA=="
},
"sass": {
"version": "1.57.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz",
"integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==",
"devOptional": true,
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
}
},
"sass-loader": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz",

View File

@ -39,5 +39,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"sass": "^1.57.1"
}
}

View File

@ -1,28 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<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`.
-->
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<title>React App</title>
</head>
<body>

BIN
src/assets/img/Logo-M3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

12
src/assets/svg/cart.svg Normal file
View File

@ -0,0 +1,12 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_3715_4730)">
<path d="M27.823 4.07236C27.6697 3.88079 27.4377 3.76928 27.1923 3.76928H5.69581L5.09469 1.16451C5.01009 0.798054 4.68377 0.538452 4.30768 0.538452H0.80768C0.361648 0.538452 0 0.9001 0 1.34619C0 1.79227 0.361648 2.15387 0.80768 2.15387H3.66516L7.7455 19.8355C7.83005 20.2019 8.15642 20.4615 8.53251 20.4615H24.7154C25.1614 20.4615 25.523 20.0999 25.523 19.6539C25.523 19.2078 25.1614 18.8462 24.7154 18.8462H9.17509L8.55384 16.1539H24.7693C25.1471 16.1539 25.4744 15.892 25.5573 15.5235L27.9803 4.75426C28.0342 4.51483 27.9763 4.26398 27.823 4.07236Z" fill="white"/>
<path d="M11.8461 21.5385C10.2132 21.5385 8.88458 22.867 8.88458 24.5C8.88458 26.133 10.2131 27.4615 11.8461 27.4615C13.4791 27.4615 14.8077 26.133 14.8077 24.5C14.8077 22.867 13.4792 21.5385 11.8461 21.5385Z" fill="white"/>
<path d="M21.5385 21.5385C19.9055 21.5385 18.5769 22.867 18.5769 24.5C18.5769 26.133 19.9054 27.4615 21.5385 27.4615C23.1714 27.4615 24.5 26.133 24.5 24.5C24.5 22.867 23.1715 21.5385 21.5385 21.5385Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_3715_4730">
<rect width="28" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.2094 11.6187C14.0951 10.4091 14.6249 8.92334 14.6249 7.31267C14.6249 3.2807 11.3444 0.000183105 7.31245 0.000183105C3.28048 0.000183105 0 3.2807 0 7.31267C0 11.3446 3.28052 14.6252 7.31248 14.6252C8.92315 14.6252 10.409 14.0953 11.6186 13.2095L16.4092 18.0001L18 16.4093C18 16.4092 13.2094 11.6187 13.2094 11.6187ZM7.31248 12.3751C4.52086 12.3751 2.25001 10.1043 2.25001 7.31267C2.25001 4.52104 4.52086 2.25019 7.31248 2.25019C10.1041 2.25019 12.375 4.52104 12.375 7.31267C12.375 10.1043 10.1041 12.3751 7.31248 12.3751Z" fill="#303030"/>
</svg>

After

Width:  |  Height:  |  Size: 655 B

View File

@ -1,7 +1,35 @@
import React from 'react';
import Logo from '../../assets/img/Logo-M3.png';
import Search from '../../assets/svg/search.svg';
import Cart from '../../assets/svg/cart.svg';
import styles from './headerStyle.module.scss';
import { HeaderBottom } from "./headerBottom";
const Header = () => {
return <div></div>
return (
<div className={styles["conteiner"]}>
<header className={styles["conteiner-header"]}>
<div>
<a href="/">
<img src={Logo} alt="Logo da M3 academy" />
</a>
</div>
<label htmlFor="search" className={styles["conteiner-search"]}>
<input className={styles["search-input"]} name='search' type="text" placeholder='Buscar...'/>
<img className={styles["search-img"]} src={Search} alt="buscar" />
</label>
<div className={styles['conteiner-cart']}>
<a className={styles['cart-text']} href="/">
Entrar
<img src={Cart} alt="carrinho" />
</a>
</div>
</header>
< HeaderBottom />
</div>
)
}
export { Header };

View File

@ -0,0 +1,26 @@
import React from 'react';
import styles from './headerStyle.module.scss';
interface text{
text: string;
}
const Links = (props: text) => {
const { text } = props;
return (
<a className={styles["bottom-item"]} href="/">{text}</a>
)
}
const HeaderBottom = () => {
return(
<div className={styles["conteiner-bottom"]}>
<Links text='cursos'/>
<Links text='saiba mais'/>
<Links text='institucionais'/>
</div>
)
};
export { HeaderBottom }

View File

@ -0,0 +1,74 @@
.conteiner {
background-color: black;
width: 100%;
.conteiner-header {
display: flex;
height: 76px;
justify-content: space-between;
align-items: center;
padding: 0px 100px;
width: 100%;
.conteiner-search {
display: flex;
background-color: white;
border: 2px solid #F2F2F2;
border-radius: 5px;
padding: 5px 16px;
height: 32px;
width: 24.445%;
.search-input, .search-input::placeholder{
font-family: 'Roboto', sans-serif;
font-weight: 400;
font-size: 14px;
border: 0;
line-height: 16px;
color: #C6C6C6;
width: 100%;
}
.search-img {
height: 18px;
width: 18px;
}
}
.conteiner-cart {
width: 12.594%;
.cart-text{
display: flex;
align-items: center;
justify-content: space-between;
text-transform: uppercase;
font-family: 'Roboto', sans-serif;
font-weight: 400;
font-size: 14px;
line-height: 16px;
color: white;
}
}
}
.conteiner-bottom {
border-top: 1px solid #C4C4C4;
height: 44px;
display: flex;
align-items: center;
padding: 0 100px;
.bottom-item{
color: white;
font-family: 'Roboto';
font-weight: 500;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
text-decoration: none;
margin-right: 55px;
}
}
}

View File

@ -1 +1,3 @@
/// <reference types="react-scripts" />
declare module '*.scss';

View File

@ -1,38 +1,5 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}