forked from M3-Academy/desafio-react-e-typescript
Merge branch 'feature/Header' into desenvolvimento
This commit is contained in:
commit
b39abcf8b5
@ -1,45 +0,0 @@
|
||||
<!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>
|
||||
<header id="rootheader"></header>
|
||||
<main id="root"></main>
|
||||
<footer id="rootfooter"></footer>
|
||||
<!--
|
||||
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>
|
@ -1,13 +0,0 @@
|
||||
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;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import React, { useState, useEffect, useRef, useMemo, useCallback,useContext} from "react"
|
||||
|
||||
|
||||
const Header = () =>{
|
||||
return (
|
||||
<div>
|
||||
conteudo do header
|
||||
</div>
|
||||
)
|
||||
};
|
||||
export {Header}
|
@ -1,11 +0,0 @@
|
||||
import React, { useState, useEffect, useRef, useMemo, useCallback,useContext} from "react"
|
||||
|
||||
|
||||
const Home = () =>{
|
||||
return (
|
||||
<div>
|
||||
conteudo do main
|
||||
</div>
|
||||
)
|
||||
};
|
||||
export {Home}
|
@ -1,15 +0,0 @@
|
||||
import { ReportHandler } from 'web-vitals';
|
||||
|
||||
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||
getCLS(onPerfEntry);
|
||||
getFID(onPerfEntry);
|
||||
getFCP(onPerfEntry);
|
||||
getLCP(onPerfEntry);
|
||||
getTTFB(onPerfEntry);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default reportWebVitals;
|
@ -1,5 +0,0 @@
|
||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||
// allows you to do things like:
|
||||
// expect(element).toHaveTextContent(/react/i)
|
||||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom';
|
@ -1,31 +0,0 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
filename: 'bundle.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [
|
||||
// Creates `style` nodes from JS strings
|
||||
'style-loader',
|
||||
// Translates CSS into CommonJS
|
||||
'css-loader',
|
||||
// Compiles Sass to CSS
|
||||
'sass-loader',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
10311
Desafio_5/yarn.lock
10311
Desafio_5/yarn.lock
File diff suppressed because it is too large
Load Diff
13
desafio-5/.editorconfig
Normal file
13
desafio-5/.editorconfig
Normal file
@ -0,0 +1,13 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = false
|
||||
max_line_length = 100
|
5
Desafio_5/.gitignore → desafio-5/.gitignore
vendored
5
Desafio_5/.gitignore → desafio-5/.gitignore
vendored
@ -1,6 +1,8 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
todo.txt
|
||||
tasksHeader.txt
|
||||
# dependencies
|
||||
/webpack.config.js
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
@ -21,4 +23,3 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
todo.txt
|
@ -1,13 +1,12 @@
|
||||
{
|
||||
"name": "Desafio_5",
|
||||
"name": "desafio-5",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "Desafio_5",
|
||||
"name": "desafio-5",
|
||||
"version": "0.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
@ -6446,16 +6445,18 @@
|
||||
"integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA=="
|
||||
},
|
||||
"node_modules/deep-equal": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.1.0.tgz",
|
||||
"integrity": "sha512-2pxgvWu3Alv1PoWEyVg7HS8YhGlUFUV7N5oOvfL6d+7xAmLSemMwv/c8Zv/i9KFzxV5Kt5CAvQc70fLwVuf4UA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
||||
"integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"es-get-iterator": "^1.1.2",
|
||||
"get-intrinsic": "^1.1.3",
|
||||
"is-arguments": "^1.1.1",
|
||||
"is-array-buffer": "^3.0.1",
|
||||
"is-date-object": "^1.0.5",
|
||||
"is-regex": "^1.1.4",
|
||||
"is-shared-array-buffer": "^1.0.2",
|
||||
"isarray": "^2.0.5",
|
||||
"object-is": "^1.1.5",
|
||||
"object-keys": "^1.1.1",
|
||||
@ -6464,7 +6465,7 @@
|
||||
"side-channel": "^1.0.4",
|
||||
"which-boxed-primitive": "^1.0.2",
|
||||
"which-collection": "^1.0.1",
|
||||
"which-typed-array": "^1.1.8"
|
||||
"which-typed-array": "^1.1.9"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@ -9344,12 +9345,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-array-buffer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.0.tgz",
|
||||
"integrity": "sha512-TI2hnvT6dPUnn/jARFCJBKL1eeabAfLnKZ2lmW5Uh317s1Ii2IMroL1yMciEk/G+OETykVzlsH6x/L4q/avhgw==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz",
|
||||
"integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"get-intrinsic": "^1.1.3"
|
||||
"get-intrinsic": "^1.1.3",
|
||||
"is-typed-array": "^1.1.10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@ -23039,16 +23041,18 @@
|
||||
"integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA=="
|
||||
},
|
||||
"deep-equal": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.1.0.tgz",
|
||||
"integrity": "sha512-2pxgvWu3Alv1PoWEyVg7HS8YhGlUFUV7N5oOvfL6d+7xAmLSemMwv/c8Zv/i9KFzxV5Kt5CAvQc70fLwVuf4UA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
||||
"integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"es-get-iterator": "^1.1.2",
|
||||
"get-intrinsic": "^1.1.3",
|
||||
"is-arguments": "^1.1.1",
|
||||
"is-array-buffer": "^3.0.1",
|
||||
"is-date-object": "^1.0.5",
|
||||
"is-regex": "^1.1.4",
|
||||
"is-shared-array-buffer": "^1.0.2",
|
||||
"isarray": "^2.0.5",
|
||||
"object-is": "^1.1.5",
|
||||
"object-keys": "^1.1.1",
|
||||
@ -23057,7 +23061,7 @@
|
||||
"side-channel": "^1.0.4",
|
||||
"which-boxed-primitive": "^1.0.2",
|
||||
"which-collection": "^1.0.1",
|
||||
"which-typed-array": "^1.1.8"
|
||||
"which-typed-array": "^1.1.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": {
|
||||
@ -25174,12 +25178,13 @@
|
||||
}
|
||||
},
|
||||
"is-array-buffer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.0.tgz",
|
||||
"integrity": "sha512-TI2hnvT6dPUnn/jARFCJBKL1eeabAfLnKZ2lmW5Uh317s1Ii2IMroL1yMciEk/G+OETykVzlsH6x/L4q/avhgw==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz",
|
||||
"integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"get-intrinsic": "^1.1.3"
|
||||
"get-intrinsic": "^1.1.3",
|
||||
"is-typed-array": "^1.1.10"
|
||||
}
|
||||
},
|
||||
"is-arrayish": {
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Desafio_5",
|
||||
"name": "desafio-5",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
@ -41,10 +41,5 @@
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"description": "desenvolvimento do desafio 5",
|
||||
"main": "index.js",
|
||||
"repository": "ssh://git@gitea.ecommercetools.com.br:22022/Gustavo_Rallenson_Goncalves_Da_Silva/desafio-react-e-typescript.git",
|
||||
"author": "Gustavo Rallenson Gonçalves Da Silva",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
25
desafio-5/public/index.html
Normal file
25
desafio-5/public/index.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="Pt-br">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<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"
|
||||
/>
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<header id="rootheader">
|
||||
|
||||
</header>
|
||||
<main id="root">
|
||||
|
||||
</main>
|
||||
<footer id="rootfooter">
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
7
desafio-5/src/components/Main.scss
Normal file
7
desafio-5/src/components/Main.scss
Normal file
@ -0,0 +1,7 @@
|
||||
@import "utils/Variables.scss";
|
||||
@import "common/global.scss";
|
||||
@import "common/resets.scss";
|
||||
@import "modules/header.module.scss";
|
||||
@import "modules/home.module.scss";
|
||||
@import "modules/footer.module.scss";
|
||||
|
5
desafio-5/src/components/assets/icons/Hamburger_menu.svg
Normal file
5
desafio-5/src/components/assets/icons/Hamburger_menu.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="28" height="23" viewBox="0 0 28 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.25 19.0001H1.75002C0.783509 19.0001 0 19.7836 0 20.7501C0 21.7166 0.783508 22.5001 1.75002 22.5001H26.25C27.2165 22.5001 28 21.7166 28 20.7501C28 19.7836 27.2165 19.0001 26.25 19.0001Z" fill="white"/>
|
||||
<path d="M26.25 9.5H1.75002C0.783509 9.5 0 10.2835 0 11.25C0 12.2165 0.783508 13 1.75002 13H26.25C27.2165 13 28 12.2165 28 11.25C28 10.2835 27.2165 9.5 26.25 9.5Z" fill="white"/>
|
||||
<path d="M26.25 0H1.75002C0.783509 0 0 0.783509 0 1.75002C0 2.71652 0.783508 3.50003 1.75002 3.50003H26.25C27.2165 3.50003 28 2.71652 28 1.75002C28 0.783509 27.2165 0 26.25 0Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 688 B |
12
desafio-5/src/components/assets/icons/cart_desk_icon.svg
Normal file
12
desafio-5/src/components/assets/icons/cart_desk_icon.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg width="55" height="55" viewBox="0 0 55 55" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_3751_539)">
|
||||
<path d="M54.3344 7.95273C54.0351 7.57862 53.5819 7.36086 53.1027 7.36086H11.1231L9.9492 2.27412C9.78398 1.55848 9.14672 1.05151 8.41228 1.05151H1.57728C0.706248 1.05151 0 1.75776 0 2.6289C0 3.50004 0.706248 4.20619 1.57728 4.20619H7.15753L15.1259 38.7358C15.291 39.4515 15.9283 39.9585 16.6628 39.9585H48.2656C49.1367 39.9585 49.8428 39.2522 49.8428 38.3812C49.8428 37.51 49.1366 36.8039 48.2656 36.8039H17.9176L16.7044 31.5462H48.3709C49.1086 31.5462 49.7478 31.0348 49.9097 30.3151L54.6416 9.28438C54.7467 8.81682 54.6338 8.32694 54.3344 7.95273Z" fill="white"/>
|
||||
<path d="M23.1338 42.0615C19.9449 42.0615 17.3503 44.6559 17.3503 47.845C17.3503 51.0341 19.9448 53.6285 23.1338 53.6285C26.3228 53.6285 28.9173 51.0341 28.9173 47.845C28.9173 44.6559 26.3229 42.0615 23.1338 42.0615Z" fill="white"/>
|
||||
<path d="M42.0614 42.0615C38.8725 42.0615 36.278 44.6559 36.278 47.845C36.278 51.0341 38.8724 53.6285 42.0614 53.6285C45.2504 53.6285 47.8449 51.0341 47.8449 47.845C47.8449 44.6559 45.2505 42.0615 42.0614 42.0615Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3751_539">
|
||||
<rect width="54.68" height="54.68" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
10
desafio-5/src/components/assets/icons/search_Icon_desk.svg
Normal file
10
desafio-5/src/components/assets/icons/search_Icon_desk.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_3751_533)">
|
||||
<path d="M25.7949 22.6886C27.5246 20.3265 28.5592 17.4252 28.5592 14.2799C28.5592 6.40637 22.1531 0.000244141 14.2796 0.000244141C6.40606 0.000244141 0 6.40637 0 14.2799C0 22.1534 6.40613 28.5596 14.2797 28.5596C17.4249 28.5596 20.3266 27.5248 22.6886 25.7951L32.0435 35.15L35.15 32.0436C35.15 32.0435 25.7949 22.6886 25.7949 22.6886ZM14.2797 24.1658C8.82824 24.1658 4.39377 19.7313 4.39377 14.2799C4.39377 8.82848 8.82824 4.39401 14.2797 4.39401C19.7311 4.39401 24.1655 8.82848 24.1655 14.2799C24.1655 19.7313 19.731 24.1658 14.2797 24.1658Z" fill="#292929"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3751_533">
|
||||
<rect width="35.15" height="35.15" rx="5" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 821 B |
BIN
desafio-5/src/components/assets/imgs/Logo-M3Academy-mobile.png
Normal file
BIN
desafio-5/src/components/assets/imgs/Logo-M3Academy-mobile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
desafio-5/src/components/assets/imgs/Logo.png
Normal file
BIN
desafio-5/src/components/assets/imgs/Logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
21
desafio-5/src/components/common/global.scss
Normal file
21
desafio-5/src/components/common/global.scss
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
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;
|
||||
}
|
||||
button{
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
outline: none;
|
||||
appearance: none;
|
||||
}
|
5
desafio-5/src/components/common/resets.scss
Normal file
5
desafio-5/src/components/common/resets.scss
Normal file
@ -0,0 +1,5 @@
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
5
desafio-5/src/components/modules/footer.module.scss
Normal file
5
desafio-5/src/components/modules/footer.module.scss
Normal file
@ -0,0 +1,5 @@
|
||||
@import "../utils/Variables.scss";
|
||||
|
||||
.main_wrapper{
|
||||
|
||||
}
|
312
desafio-5/src/components/modules/header.module.scss
Normal file
312
desafio-5/src/components/modules/header.module.scss
Normal file
@ -0,0 +1,312 @@
|
||||
@import "../utils/Variables.scss";
|
||||
|
||||
//desktop
|
||||
|
||||
.Header_wrapper {
|
||||
display: flex;
|
||||
color: white;
|
||||
background: black;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: 22.225vh;
|
||||
max-height: 160px;
|
||||
|
||||
&-mobileTop{
|
||||
display: none;
|
||||
}
|
||||
&-mobilebottom{
|
||||
display: none;
|
||||
}
|
||||
// Top-header
|
||||
|
||||
&-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 22px 100px;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
min-height: 63.333333333333%;
|
||||
border-bottom: 1px solid $-gray-300;
|
||||
|
||||
&-logo {
|
||||
border: 0;
|
||||
width: 12.593%;
|
||||
max-width: 264.61px;
|
||||
margin: 3px 0;
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
&-Searchbox{
|
||||
width: 24.445%;
|
||||
height: 5.926vh;
|
||||
max-width: 514.62px;
|
||||
max-height: 56px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
input{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 7px 14% 7px 16px;
|
||||
background: $-white;
|
||||
border: 2px solid $-gray-200;
|
||||
border-radius: 5px;
|
||||
}
|
||||
input[placeholder] {
|
||||
//digitação
|
||||
color: $-gray-400 !important;
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
button{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 2.652% 16px;
|
||||
width: 6.82%;
|
||||
height: 72%;
|
||||
img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-menu{
|
||||
margin: 3px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 55px;
|
||||
width: 12.594%;
|
||||
height: 90.35%;
|
||||
order: 2;
|
||||
|
||||
&-login{
|
||||
text-transform: uppercase;
|
||||
color: $-white;
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
|
||||
}
|
||||
|
||||
&-cart{
|
||||
min-height: 28px;
|
||||
max-height: 52px;
|
||||
img{
|
||||
min-width: 28px;
|
||||
width: 100%;
|
||||
max-width: 52px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//bottom-header
|
||||
|
||||
&-bottom {
|
||||
min-height: 36.666666666667%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding: 14px 100px;
|
||||
gap: 10px;
|
||||
&-navigator{
|
||||
width: 32.686%;
|
||||
ul{
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: 55px;
|
||||
li{
|
||||
min-height: 16px;
|
||||
min-width: 54px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
button{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
color: $-white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4k
|
||||
|
||||
@media screen and (min-width: 2500px){
|
||||
//desktop
|
||||
|
||||
.Header_wrapper {
|
||||
height: 15.312vh;
|
||||
max-height: 100%;
|
||||
|
||||
// Top-header
|
||||
|
||||
&-top {
|
||||
&-logo {
|
||||
width: 11.549%;
|
||||
max-width: 100%;
|
||||
}
|
||||
&-Searchbox{
|
||||
width: 22.435%;
|
||||
height: 5.388vh;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
|
||||
input[placeholder] {
|
||||
//digitação
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
|
||||
button{
|
||||
width: 6.82%;
|
||||
height: 76%;
|
||||
}
|
||||
}
|
||||
&-menu{
|
||||
width: 9.336%;
|
||||
height: 93.85%;
|
||||
&-login{
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
|
||||
&-cart{
|
||||
min-height: 56px;
|
||||
max-height: 100%;
|
||||
img{
|
||||
min-width: 56px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//bottom-header
|
||||
|
||||
&-bottom {
|
||||
&-navigator{
|
||||
width: 25.56522%;
|
||||
ul{
|
||||
li{
|
||||
min-height: 33px;
|
||||
min-width: 54px;
|
||||
button{
|
||||
font-weight: 500;
|
||||
font-size: 28px;
|
||||
line-height: 33px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Mobile
|
||||
|
||||
@media screen and (min-width: 280px) and (max-width: 1024px) {
|
||||
|
||||
.Header_wrapper {
|
||||
height: 25.93vh;
|
||||
max-height: 100%;
|
||||
// Top-header-mobile
|
||||
|
||||
&-mobileTop {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 25px 16px;
|
||||
gap: 10px;
|
||||
height: 16.297vh;
|
||||
&-menu{
|
||||
border: none;
|
||||
min-height: 22.5px;
|
||||
height: 4.083vh;
|
||||
.hamburguer{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
&-logo{
|
||||
border: 0;
|
||||
max-width: 136px;
|
||||
width: 39.652%;
|
||||
img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
&-cart{
|
||||
height: 28px;
|
||||
max-height: 100%;
|
||||
img{
|
||||
min-width: 28px;
|
||||
height: 28px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
//bottom-header-mobile
|
||||
&-mobilebottom{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 16px 25px 16px ;
|
||||
&-Searchbox{
|
||||
width: 100%;
|
||||
height: 6.669vh;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
input{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 7px 10% 7px 16px;
|
||||
background: $-white;
|
||||
border: 2px solid $-gray-200;
|
||||
border-radius: 5px;
|
||||
}
|
||||
input[placeholder] {
|
||||
//digitação
|
||||
color: $-gray-400 !important;
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
button{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 7px 16px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Top-header-desktop
|
||||
&-top {
|
||||
display: none;
|
||||
}
|
||||
//bottom-header-desktop
|
||||
&-bottom {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
5
desafio-5/src/components/modules/home.module.scss
Normal file
5
desafio-5/src/components/modules/home.module.scss
Normal file
@ -0,0 +1,5 @@
|
||||
@import "../utils/Variables.scss";
|
||||
|
||||
.main_wrapper{
|
||||
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
import React, { useState, useEffect, useRef, useMemo, useCallback,useContext} from "react"
|
||||
|
||||
import FooterStyles from "../modules/footer.module.scss"
|
||||
|
||||
const Footer = () =>{
|
||||
return (
|
||||
<div>
|
||||
<div className={FooterStyles["main_wrapper"]}>
|
||||
conteudo do footer
|
||||
</div>
|
||||
)
|
||||
};
|
||||
export {Footer}
|
||||
|
||||
export { Footer }
|
77
desafio-5/src/components/scripts/header.tsx
Normal file
77
desafio-5/src/components/scripts/header.tsx
Normal file
@ -0,0 +1,77 @@
|
||||
import React, { useState, useEffect, useRef, useMemo, useCallback,useContext} from "react"
|
||||
|
||||
import HeaderStyles from "../modules/header.module.scss"
|
||||
import Logo from '../assets/imgs/Logo.png';
|
||||
import LogoMobile from '../assets/imgs/Logo-M3Academy-mobile.png';
|
||||
import Lupa from "../assets/icons/search_Icon_desk.svg";
|
||||
import Cart from "../assets/icons/cart_desk_icon.svg";
|
||||
import MenuMobile from "../assets/icons/Hamburger_menu.svg";
|
||||
|
||||
const Header = () =>{
|
||||
return (
|
||||
<div className={HeaderStyles["Header_wrapper"]}>
|
||||
|
||||
<div className={HeaderStyles["Header_wrapper-top"]}>
|
||||
<fieldset className={HeaderStyles["Header_wrapper-top-logo"]}>
|
||||
<a href="/">
|
||||
<img src={Logo} alt="Logo" />
|
||||
</a>
|
||||
</fieldset>
|
||||
<div className={HeaderStyles["Header_wrapper-top-Searchbox"]}>
|
||||
<input name="search" type="text" placeholder="Buscar">
|
||||
</input>
|
||||
<label htmlFor="search">
|
||||
<button>
|
||||
<img src={Lupa} alt="Lupa" />
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
<div className={HeaderStyles["Header_wrapper-top-menu"]}>
|
||||
<button className={HeaderStyles["Header_wrapper-top-menu-login"]}>Entrar</button>
|
||||
<button className={HeaderStyles["Header_wrapper-top-menu-cart"]}>
|
||||
<img src={Cart} alt="Carrinho_icon" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={HeaderStyles["Header_wrapper-mobileTop"]}>
|
||||
<fieldset className={HeaderStyles["Header_wrapper-mobileTop-menu"]}>
|
||||
<img className={HeaderStyles["hamburguer"]} src={MenuMobile} alt="Logo-mobile" />
|
||||
</fieldset>
|
||||
<fieldset className={HeaderStyles["Header_wrapper-mobileTop-logo"]}>
|
||||
<a href="/">
|
||||
<img src={LogoMobile} alt="Logo-mobile" />
|
||||
</a>
|
||||
</fieldset>
|
||||
<button className={HeaderStyles["Header_wrapper-mobileTop-cart"]}>
|
||||
<img src={Cart} alt="Carrinho_icon" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className={HeaderStyles["Header_wrapper-mobilebottom"]}>
|
||||
|
||||
<div className={HeaderStyles["Header_wrapper-mobilebottom-Searchbox"]}>
|
||||
<input name="search" type="text" placeholder="Buscar">
|
||||
</input>
|
||||
<label htmlFor="search">
|
||||
<button>
|
||||
<img src={Lupa} alt="Lupa" />
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={HeaderStyles["Header_wrapper-bottom"]}>
|
||||
<nav className={HeaderStyles["Header_wrapper-bottom-navigator"]}>
|
||||
<ul>
|
||||
<li><button>CURSOS</button></li>
|
||||
<li><button>SAIBA MAIS</button></li>
|
||||
<li><button>INSTITUCIONAIS</button></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
||||
export { Header }
|
14
desafio-5/src/components/utils/Variables.scss
Normal file
14
desafio-5/src/components/utils/Variables.scss
Normal file
@ -0,0 +1,14 @@
|
||||
// colors
|
||||
$-black : #000000;
|
||||
$-white:#ffffff;
|
||||
$-gray: #D6D6D6;
|
||||
$-gray-light:#e5e5e5;
|
||||
$-gray-100: #F0F0F0;
|
||||
$-gray-200: #F2F2F2;
|
||||
$-gray-300:#C4C4C4;
|
||||
$-gray-400:#C6C6C6;
|
||||
$-gray-500:#858585;
|
||||
$-gray-600:#333333;
|
||||
$-prisma: #FF5A5F;
|
||||
$-crimson: rgb(156, 4, 34);
|
||||
$-shockPink:rgb(220, 20, 60);
|
@ -1,32 +1,33 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './Global.scss';
|
||||
import { Home } from './pages/home';
|
||||
import { Header } from './components/partials/header';
|
||||
import { Footer } from './components/partials/footer';
|
||||
import { Header } from './components/scripts/header';
|
||||
import { Footer } from './components/scripts/footer';
|
||||
import './components/Main.scss';
|
||||
import './components/common/global.scss';
|
||||
import './components/common/resets.scss'
|
||||
|
||||
const rootElementheader = document.getElementById('rootheader');
|
||||
const rootElement = document.getElementById('root');
|
||||
const rootheader = document.getElementById('rootheader');
|
||||
const rootfooter = document.getElementById('rootfooter');
|
||||
|
||||
const rootElementmain = document.getElementById('root');
|
||||
|
||||
const rootElementfooter = document.getElementById('rootfooter');
|
||||
|
||||
if (rootElementheader) {
|
||||
ReactDOM.createRoot(rootElementheader).render(
|
||||
if (rootheader) {
|
||||
ReactDOM.createRoot(rootheader).render(
|
||||
<Header />
|
||||
);
|
||||
} else {
|
||||
// rootElement não foi encontrado. Talvez seja necessário aguardar o carregamento da página.
|
||||
}
|
||||
if (rootElementmain) {
|
||||
ReactDOM.createRoot(rootElementmain).render(
|
||||
|
||||
if (rootElement) {
|
||||
ReactDOM.createRoot(rootElement).render(
|
||||
<Home />
|
||||
);
|
||||
} else {
|
||||
// rootElement não foi encontrado. Talvez seja necessário aguardar o carregamento da página.
|
||||
}
|
||||
if (rootElementfooter) {
|
||||
ReactDOM.createRoot(rootElementfooter).render(
|
||||
if (rootfooter) {
|
||||
ReactDOM.createRoot(rootfooter).render(
|
||||
<Footer />
|
||||
);
|
||||
} else {
|
13
desafio-5/src/pages/home.tsx
Normal file
13
desafio-5/src/pages/home.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React, { useState, useEffect, useRef, useMemo, useCallback,useContext} from "react"
|
||||
|
||||
import MainStyles from "../components/modules/home.module.scss"
|
||||
|
||||
const Home = () =>{
|
||||
return (
|
||||
<div className={MainStyles["main_wrapper"]}>
|
||||
conteudo da main
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
||||
export { Home }
|
31
desafio-5/webpack.config.js
Normal file
31
desafio-5/webpack.config.js
Normal file
@ -0,0 +1,31 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
filename: 'bundle.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [
|
||||
// Creates `style` nodes from JS strings
|
||||
'style-loader',
|
||||
// Translates CSS into CommonJS
|
||||
'css-loader',
|
||||
// Compiles Sass to CSS
|
||||
'sass-loader',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user