diff --git a/src/App.css b/src/App.css index b9d355d..3fb3548 100644 --- a/src/App.css +++ b/src/App.css @@ -1,4 +1,4 @@ -#root { +/* #root { max-width: 1280px; margin: 0 auto; padding: 2rem; @@ -39,4 +39,4 @@ .read-the-docs { color: #888; -} +} */ diff --git a/src/App.tsx b/src/App.tsx index d1ba616..c6b1bfc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,28 +1,9 @@ -import { useState } from 'react'; -import reactLogo from './assets/react.svg'; -import viteLogo from '/vite.svg'; import './App.css'; +import { Header } from './components/Header'; export const App = () => { - const [count, setCount] = useState(0); - return ( <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

Click on the Vite and React logos to learn more

+
); }; diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index e69de29..b5a4380 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -0,0 +1,85 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + // padding: 18px 0; + border-bottom: 1px solid #e2e6e9; + &__menu { + display: flex; + } + &__logo { + width: 80px; + height: 28px; + margin-right: 48px; + margin-left: 24px; + @media (max-width: 1200px) { + width: 64px; + height: 20px; + } + } + &__icons { + display: flex; + // background-color: aqua; + &--like { + width: 16px; + height: 16px; + background-image: url(../../img/headerIcon/like.png); + display: block; + background-size: cover; + background-repeat: no-repeat; + background-position: center; + margin: 24px; + @media (max-width: 1200px) { + margin: 16px; + } + @media (max-width: 640px) { + display: none; + } + } + &--basket { + width: 16px; + height: 16px; + display: block; + background-image: url(../../img/headerIcon/basket.png); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + margin: 24px; + @media (max-width: 1200px) { + margin: 16px; + } + @media (max-width: 640px) { + display: none; + } + } + &--menu { + display: none; + width: 16px; + height: 16px; + background-image: url(../../img/headerIcon/Menu.png); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + margin: 16px; + @media (max-width: 640px) { + display: block; + } + } + } + &__icon--like { + display: block; + border-right: 1px solid #e2e6e9; + border-left: 1px solid #e2e6e9; + @media (max-width: 640px) { + display: none; + } + } + &__icon--menu { + display: none; + border-right: 1px solid #e2e6e9; + border-left: 1px solid #e2e6e9; + @media (max-width: 640px) { + display: block; + } + } +} diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 6369835..2214d05 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,9 +1,29 @@ import React from 'react'; -import './Header.scss' +import { NavHeader } from './NavHeader'; +import './Header.scss'; +import logo from '../../img/Logo.png'; // eslint-disable-next-line @typescript-eslint/no-empty-object-type type Props = {}; export const Header: React.FC = () => { - return <>; + return ( +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ); }; diff --git a/src/components/Header/NavHeader/NavHeader.scss b/src/components/Header/NavHeader/NavHeader.scss index e69de29..0080784 100644 --- a/src/components/Header/NavHeader/NavHeader.scss +++ b/src/components/Header/NavHeader/NavHeader.scss @@ -0,0 +1,49 @@ +.nav { + display: flex; + align-items: center; + @media (max-width: 640px) { + display: none; + } + &__icon { + text-transform: uppercase; + font-weight: 800; + font-size: 12px; + line-height: 11px; + letter-spacing: 4%; + color: #89939a; + + &:not(:last-child) { + margin-right: 64px; + } + @media (max-width: 1200px) { + &:not(:last-child) { + margin-right: 36px; + } + } + &--active { + background-color: aqua; + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 2px; + background-color: #000; + } + } + } +} + +.nav__icon--active { + background-color: aqua; + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 2px; + background-color: #000; + } +} diff --git a/src/components/Header/NavHeader/NavHeader.tsx b/src/components/Header/NavHeader/NavHeader.tsx index 6c454f6..ab1f4f1 100644 --- a/src/components/Header/NavHeader/NavHeader.tsx +++ b/src/components/Header/NavHeader/NavHeader.tsx @@ -4,5 +4,12 @@ import './NavHeader.scss'; type Props = {}; export const NavHeader: React.FC = () => { - return <>; + return ( +
+
home
+
phones
+
tablets
+
accessories
+
+ ); }; diff --git a/src/img/Logo.png b/src/img/Logo.png new file mode 100644 index 0000000..195f3bc Binary files /dev/null and b/src/img/Logo.png differ diff --git a/src/img/headerIcon/Menu.png b/src/img/headerIcon/Menu.png new file mode 100644 index 0000000..3b3e698 Binary files /dev/null and b/src/img/headerIcon/Menu.png differ diff --git a/src/img/headerIcon/basket.png b/src/img/headerIcon/basket.png new file mode 100644 index 0000000..f832af8 Binary files /dev/null and b/src/img/headerIcon/basket.png differ diff --git a/src/img/headerIcon/like.png b/src/img/headerIcon/like.png new file mode 100644 index 0000000..c6ba7d0 Binary files /dev/null and b/src/img/headerIcon/like.png differ diff --git a/src/index.css b/src/index.css index 6119ad9..e808afc 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,4 @@ -:root { +/* :root { font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; @@ -65,4 +65,13 @@ button:focus-visible { button { background-color: #f9f9f9; } +} */ + +body { + margin: 0; + font-family: 'Montserrat', sans-serif; + /* display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; */ }