Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 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://abakkaba.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://abakkaba.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 All @@ -39,5 +39,5 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan
- [ ] **CSS Variable** is used for a blue color
- [ ] Pseudo-element is used for a blue line below the active link
- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md)
- [ ] The Google Fonts Configuration follows requirements.
![alt text](./assets/image.png)
- [ ] The Google Fonts Configuration follows requirements.
![alt text](./assets/image.png)
92 changes: 92 additions & 0 deletions 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@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="./images/logo.png"
alt="Moyo company logo"
/>
</a>
<nav class="nav">
<ul class="nav_list">
<li class="nav_list_item">
<a
href="#apple"
class="nav_link is-active"
>
Apple
</a>
</li>
<li class="nav_list_item">
<a
href="#samsung"
class="nav_link"
>
Samsung
</a>
</li>
<li class="nav_list_item">
<a
href="#smartphones"
class="nav_link"
>
Smartphones
</a>
</li>
<li class="nav_list_item">
<a
href="#laptops"
class="nav_link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="nav_list_item">
<a
href="#gadgets"
class="nav_link"
>
Gadgets
</a>
</li>
<li class="nav_list_item">
<a
href="#tablets"
class="nav_link"
>
Tablets
</a>
</li>
<li class="nav_list_item">
<a
href="#photo"
class="nav_link"
>
Photo
</a>
</li>
<li class="nav_list_item">
<a
href="#video"
class="nav_link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
<h1>Moyo header</h1>
</body>
</html>
68 changes: 68 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
body {
--link-active-color: #00acdc;

font-family: Roboto, sans-serif;
font-weight: 500;
margin: 0;
}

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

.logo {
display: flex;
align-items: center;
}

.nav {
display: flex;
align-items: center;
}

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

.nav_list_item {
margin-right: 20px;
}

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

.nav_link {
display: flex;
justify-content: center;
align-items: center;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The requirement is for the navigation link text to be centered. You've correctly centered it vertically using align-items: center. To fully meet the requirement, you also need to center it horizontally. You can achieve this by adding one more flexbox property here.

font-size: 12px;
line-height: 15px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The alt attribute value logo is a bit generic. The code style rules recommend describing the image content more specifically. A better alternative would be Moyo company logo to provide more context for users with screen readers.

text-decoration: none;
text-transform: uppercase;
color: #000;
height: 60px;
}

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

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

.nav_link:hover {
color: var(--link-active-color);
}
Loading