Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
IlonaRuslanova committed Dec 22, 2024
1 parent f2d4745 commit b3bbedd
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

## Checklist

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:
❗️ Replace `<IlonaRuslanova>` 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://IlonaRuslanova.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://IlonaRuslanova.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
84 changes: 84 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,92 @@
rel="stylesheet"
href="./style.css"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="index.html"
class="logo"
>
<img
src="images/logo.png"
alt="moyo logo"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="index.html"
class="nav__link is-active"
>
apple
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
samsung
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
smartphones
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
data-qa="hover"
>
laptops & computers
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
gadgets
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
tablets
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
photo
</a>
</li>
<li class="nav__item">
<a
href="index.html"
class="nav__link"
>
video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
90 changes: 90 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,93 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Roboto, sans-serif;
font-size: 12px;

--blue-color: #00acdc;
}

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

.nav__list {
list-style-type: none;
display: flex;
padding: 0;
margin: 0;
justify-content: flex-end;
}

.nav__item {
display: inline-block;
margin-right: 20px;
}

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

.nav__link {
text-transform: uppercase;
text-decoration: none;
color: black;
font-style: normal;
font-weight: 500;
height: 60px;
line-height: 60px;
display: flex;
align-items: center;
position: relative;
}

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

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

[data-qa_hover]::after {
content: '';
display: block;
background-color: #00acdc;
text-align: center;
height: 4px;
border-radius: 8px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}

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

.logo {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
}

0 comments on commit b3bbedd

Please sign in to comment.