Skip to content

Commit

Permalink
Add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mishakoshilka committed Dec 30, 2024
1 parent f2d4745 commit cc4a594
Show file tree
Hide file tree
Showing 3 changed files with 175 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://mishakoshilka.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://mishakoshilka.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
94 changes: 93 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,100 @@
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@400;500;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="header__logo"
>
<img
src="images/logo.png"
alt="logo"
/>
</a>

<nav class="header__nav">
<ul class="header__menu">
<li>
<a
href="#"
class="header__link is-active"
>
Apple
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Samsung
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Smartphones
</a>
</li>
<li>
<a
href="#"
class="header__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Gadgets
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Tablets
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Photo
</a>
</li>
<li>
<a
href="#"
class="header__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
80 changes: 80 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}

.header {
margin: 0;
padding: 0;
padding-inline: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}

.header__logo {
margin: 0;
margin-block: 10px;
width: 40px;
height: 40px;
}

.header__nav {
position: relative;
}

.header__menu {
display: flex;
list-style: none;
align-items: center;
justify-content: center;
padding: 0;
margin: 0;
}

.header__menu li {
margin-right: 20px;
}

.header__menu li:last-child {
margin-right: 0;
}

.header__link {
display: flex;
align-items: center;
justify-content: center;
height: 60px;
font-family: Roboto, sans-serif;
color: #000;
position: relative;
text-transform: uppercase;
font-size: 12px;
font-weight: 500;
text-align: center;
text-underline-position: from-font;
text-decoration-skip-ink: none;
text-decoration: none;
}

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

.header__link:last-child {
margin-right: 0;
}

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

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

0 comments on commit cc4a594

Please sign in to comment.