Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 the `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://<Starkillerr>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<Starkillerr>.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
85 changes: 84 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!doctype html>
<html lang="en">
<head>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
/>
<meta charset="UTF-8" />
<meta
name="viewport"
Expand All @@ -17,6 +21,85 @@
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="Moyo logo"
/>
</a>

<nav>
<ul class="nav_list">
<li class="nav_item">
<a
class="nav_link is-active"
href="#"
>
Apple
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
Samsung
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
Smartphones
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
Laptops & Computers
</a>
Comment on lines 62 to 68

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is missing the required data-qa="hover" attribute. The task description specifies: 'add data-qa="hover" attribute to the 4th link for testing (Laptops & computers)'.

</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
Gadgets
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
tablets
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
photo
</a>
</li>
<li class="nav_item">
<a
class="nav_link"
href="#"
>
video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
71 changes: 71 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
html {
box-sizing: border-box;

--primary-blue: #00a0ff;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For global variables like this, it's a common convention to define them within the :root pseudo-class instead of the html selector. While both work in this case, :root is generally preferred as it has higher specificity and clearly signals that these are global variables for the entire document.

}

body {
margin: 0;
padding: 0;
font-family: Roboto, sans-serif;
font-weight: 500;
font-style: normal;
}

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

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

.nav_item {
margin-right: 30px;
}

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

.nav_link {
display: flex;
text-decoration: none;
color: #000;
height: 60px;

text-transform: uppercase;
position: relative;
align-items: center;
}

.logo {
height: 40px;
width: 40px;
}

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

.nav_link.is-active {
color: var(--primary-blue);
}

.nav_link.is-active::after {
content: '';
height: 4px;
width: 100%;
background-color: var(--primary-blue);

border-radius: 10px;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
Loading