Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ATkachenkoA committed Dec 21, 2024
1 parent f2d4745 commit ff62026
Show file tree
Hide file tree
Showing 3 changed files with 178 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://ATkachenkoA.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://ATkachenkoA.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
Expand Up @@ -15,8 +15,105 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="header__container">
<a
href="index.html"
class="logo"
>
<img
src="./images/logo.png"
alt="Moyo"
class="logo__img"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
class="nav__link is-active"
href="#"
>
Apple
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
data-qa="hover"
href="#"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Photo
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
Video
</a>
</li>
</ul>
</nav>
</div>
</header>
<main>
<h1>Moyo header</h1>
</main>
</body>
</html>
78 changes: 78 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
html {
color: #00acdc;
}

body {
margin: 0;
box-sizing: border-box;
}

.header__container {
padding: 0 50px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
background-color: white;
flex-wrap: wrap;
gap: 60px;
max-width: 1200px;
}

.logo__img {
width: 100%;
height: 40px;
}

.nav__list {
display: flex;
flex-wrap: wrap;
gap: 20px;
font-family: Roboto, sans-serif;
font-weight: 500;
font-size: 12px;
line-height: 60px;
text-transform: uppercase;
list-style: none;
height: 60px;
}

.nav__link {
border-bottom: 4px solid transparent;
text-decoration: none;
transition:
color 0.5s,
border-color 0.5s;
color: black;
}

.nav__link:hover {
color: #00acdc;
border-bottom: 4px solid;
}

a.is-active {
position: relative;
color: #00acdc;
}

a.is-active:hover {
border-bottom: 4px solid transparent;
}

.is-active::after {
content: '';
display: block;
width: 100%;
height: 4px;
background-color: #00acdc;
position: absolute;
border-radius: 8px;
bottom: 0;
left: 0;
}

.nav__link:nth-child(4) {
color: #00acdc;
}

.nav__link:last-child {
margin: 0;
}

0 comments on commit ff62026

Please sign in to comment.