Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Vasilenko committed Mar 11, 2024
1 parent 5a4ee4d commit f569cd7
Show file tree
Hide file tree
Showing 3 changed files with 177 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://Syogunok.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Syogunok.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
90 changes: 89 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,100 @@
content="ie=edge"
/>
<title>Moyo header</title>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&amp;display=swap"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="Moyo logo"
class="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 &amp; 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>
86 changes: 86 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,89 @@
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);
}

.logo {
display: block;
height: 40px;
width: 40px;
}

.logo__image {
height: 100%;
width: 100%;
}

nav {
display: block;
}

.nav__list {
display: flex;
padding: 0;
margin: 0;
list-style: 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;
font-size: 12px;
font-weight: 500;
white-space: nowrap;
text-decoration: none;
text-transform: uppercase;
color: #000;
transition: color 0.3s;
}

.nav__link.is-active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 4px;
border-radius: 2px;
background-color: #00acdc;
}

.nav__link.is-active {
color: #00acdc;
}

.nav__link:hover {
color: #00acdc;
}

ul {
display: block;
list-style-type: disc;
margin-block: 1em;
margin-inline: 0;
padding-inline-start: 40px;
}

li {
display: list-item;
text-align: -webkit-match-parent;
}

0 comments on commit f569cd7

Please sign in to comment.