Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mhryvko committed Apr 29, 2024
1 parent 25cf8a0 commit 75fd920
Show file tree
Hide file tree
Showing 4 changed files with 166 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://mhryvko.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://mhryvko.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
93 changes: 92 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,103 @@
content="ie=edge"
/>
<title>Moyo header</title>
<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"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo-link"
>
<img
src="images/logo.png"
alt="logo"
class="logo"
/>
</a>
<nav class="main-nav">
<ul class="nav-list">
<li>
<a
href="#"
class="nav-link is-active"
>
Apple
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Samsung
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Smartphones
</a>
</li>
<li data-qa="hover">
<a
href="#"
class="nav-link"
>
Laptops & Computers
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Gadgets
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Tablets
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Photo
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
Binary file added src/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
body {
margin: 0;
font-family: Roboto, sans-serif;
background-color: azure;
font-weight: 500;
font-style: normal;
height: 100%;
}

.header {
background-color: #fff;
display: flex;
align-items: center;
padding: 0 50px;
}

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

.main-nav {
margin-left: auto;
box-sizing: border-box;
}

.nav-list {
padding: 0;
margin: 0;
text-align: center;
box-sizing: border-box;
display: flex;
}

.nav-list li {
display: inline-block;
font-size: 12px;
text-transform: uppercase;
box-sizing: border-box;
}

.nav-list li:not(:last-child) {
margin-right: 20px;
}

.nav-link {
position: relative;
text-decoration: none;
color: black;
height: 60px;
line-height: 60px;
display: block;
}

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

.nav-link:hover {
color: #00acdc;
}

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

0 comments on commit 75fd920

Please sign in to comment.