Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Ditiselit committed Dec 10, 2024
1 parent f2d4745 commit 0c6487b
Show file tree
Hide file tree
Showing 3 changed files with 163 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://ditiselit.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://ditiselit.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
89 changes: 88 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,99 @@
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="index.html"
class="logo"
>
<img
src="images/logo.png"
alt="moyo"
class="logo__img"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="index.html"
class="nav__link is-active"
>
Apple
</a>

<a
href="index.html"
class="nav__link"
>
Samsung
</a>

<a
href="index.html"
class="nav__link"
>
Smartphones
</a>

<a
href="index.html"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>

<a
href="index.html"
class="nav__link"
>
Gadgets
</a>

<a
href="index.html"
class="nav__link"
>
Tablets
</a>

<a
href="index.html"
class="nav__link"
>
Photo
</a>

<a
href="index.html"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
73 changes: 73 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
* {
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
}

html {
font-family: Roboto, sans-serif;
font-style: normal;
line-height: normal;
}

:root {
--main-color: black;
--active-color: #00acdc;
}

body {
margin: 0;
}

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

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

.nav__list {
display: flex;
list-style: none;
padding: 0;
margin: 0;
}

.nav__item {
display: flex;
gap: 20px;
padding: 0;
margin: 0;
}

.nav__link {
display: block;
height: 60px;
line-height: 60px;
padding: 0;
text-decoration: none;
color: var(--main-color);
}

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

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

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

0 comments on commit 0c6487b

Please sign in to comment.