Skip to content

Commit

Permalink
add moyou header New fork
Browse files Browse the repository at this point in the history
  • Loading branch information
pvnovikova committed May 3, 2024
1 parent 25cf8a0 commit 2bbe18b
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 3 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)
- [DEMO LINK](https://pvnovikova.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://pvnovikova.github.io/layout_moyo-header/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
99 changes: 98 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- #head region -->
<!doctype html>
<html lang="en">
<head>
Expand All @@ -6,6 +7,19 @@
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
Expand All @@ -16,7 +30,90 @@
href="./style.css"
/>
</head>
<!-- #endregion -->

<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="header__logo"
>
<img
src="./images/logo.png"
alt="moyoLogo"
class="header__logo--image"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Photo
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
81 changes: 81 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
html {
font-family: Roboto, sans-serif;

--active-color: #00acdc;
}

body {
margin: 0;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;

padding: 0 50px;

background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header__logo {
display: flex;
height: 40px;
width: 40px;
}

.header__logo--image {
height: 100%;
width: 100%;
}

.nav__list {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
}

.nav__item {
margin-left: 20px;
}

.nav__item:first-child {
margin-left: 0;
}

.nav__link {
position: relative;
display: flex;
align-items: center;

height: 60px;

font-family: Roboto, sans-serif;
text-decoration: none;
text-transform: uppercase;
font-size: 12px;
font-weight: 500;
color: #000;
white-space: nowrap;

transition: color 0.3s;
}

.nav__link:hover {
color: var(--active-color);
}

.nav__link.is-active {
color: var(--active-color);
}

.nav__link.is-active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;

background-color: var(--active-color);
height: 4px;
border-radius: 2px;
}

0 comments on commit 2bbe18b

Please sign in to comment.