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://Renata11111-afk.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Renata11111-afk.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)
93 changes: 92 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,99 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"

Choose a reason for hiding this comment

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

This line exceeds the 80-character limit specified in the code style requirements. While long URLs can sometimes be an exception, it's a good practice to be mindful of this rule.

rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="#home-page">
<img
class="logo"
src="/src/images/logo.png"
alt="Moyo header logo"
/>
</a>

<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a
class="nav-link is-active"
href="#apple"
>
Apple
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#samsung"
>
Samsung
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#smartphones"
>
Smartphones
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
data-qa="hover"
href="#laptops-&-computers"
>
Laptops & Computers
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#gadgets"
>
Gadgets
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#tablets"
>
Tablets
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#photo"
>
Photo
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="#video"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
77 changes: 77 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
:root {
--color: #00acdc;
}

html {
font-family: Roboto, sans-serif;
font-weight: 500;
font-size: 12px;
text-transform: uppercase;
}

body {
margin: 0;
padding: 0;
}

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

.logo {
padding: 0;
height: 40px;
width: 40px;
display: block;
}

.nav-list {
display: flex;
margin: 0;
padding: 0;
}

.nav-item {
display: flex;
list-style: none;
}

.nav-item + .nav-item {
margin-left: 20px;
}

.nav-link {
display: flex;
justify-content: center;
text-decoration: none;
position: relative;
align-items: center;
height: 60px;
color: black;
}

.nav-link:hover {
color: var(--color);
}

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

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

@media (max-width: 1024px) {
.nav-item + .nav-item {
margin-left: 20px;
}
Comment on lines +76 to +79

Choose a reason for hiding this comment

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

This media query is redundant because the rule inside it is identical to the one defined on line 42. Since it doesn't change the styling, this entire @media block can be safely removed to keep the code cleaner.

}