Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Petrychenko authored and Oleksii Petrychenko committed Dec 29, 2024
1 parent f2d4745 commit 2c0333a
Show file tree
Hide file tree
Showing 3 changed files with 171 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://Katy4S.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Katy4S.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
92 changes: 91 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,103 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
href="https://fonts.googleapis.com/css2?family=Bellefair&family=Roboto:wght@400;500&family=Yuji+Boku&display=swap"
rel="stylesheet"
/>
<title>Moyo header</title>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<div class="container">
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="MOYO logo"
class="logo__img"
/>
</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>
</div>
</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 @@
/* Reset default browser styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

a {
text-decoration: none;
color: inherit;
}

ul,
li {
list-style: none;
margin: 0;
padding: 0;
}

html {
--blue: #00acdc;
}

body {
margin: 0;
font-family: Roboto, sans-serif;
font-size: 12px;
background-color: #eee;
font-weight: 500;
}

.header {
display: flex;
justify-content: space-between;
padding: 0 50px;
background-color: #fff;
}

.logo {
display: block;
padding-top: 10px;
align-items: right;
}

.nav {
text-transform: uppercase;
}

.nav__list {
display: flex;
}

.nav__item:not(:first-child) {
margin-left: 20px;
}

.nav__link {
display: flex;
align-items: center;
height: 60px;
}

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

.is-active {
color: var(--blue);
position: relative;
}

.is-active::after {
content: '';
bottom: 0;
left: 0;
position: absolute;
height: 4px;
width: 100%;
background-color: var(--blue);
border-radius: 8px;
}

0 comments on commit 2c0333a

Please sign in to comment.