Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #5813

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
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://alla-vedmid.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://alla-vedmid.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
57 changes: 56 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,67 @@
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:ital,wght@0,400;0,700;1,400&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header>
<div class="header-logo">
<a href="/">
<img
src="images/logo.png"

Choose a reason for hiding this comment

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

Consider providing a more descriptive alt attribute for the logo image. This will improve accessibility for users who rely on screen readers.

alt="Moyo logo"

Choose a reason for hiding this comment

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

The alt attribute for the image is not descriptive enough. It's important for accessibility that this attribute accurately describes the image content. Please update it to provide a more meaningful description.

/>
</a>
</div>
<nav class="navigation">
<ul class="nav-link-list">
<li class="link-item">
<a href="/">Apple</a>
</li>
<li class="link-item">
<a href="/">Samsung</a>
</li>
<li class="link-item">
<a href="/">Smartphones</a>
</li>
<li class="link-item">
<a
href="/"
data-qa="hover"
class="is-active"
>
Laptops & Computers
</a>
</li>
<li class="link-item">
<a href="/">Gadgets</a>
</li>
<li class="link-item">
<a href="/">Tablets</a>
</li>
<li class="link-item">
<a href="/">Photo</a>
</li>
<li class="link-item">
<a href="/">Video</a>
Comment on lines +34 to +71

Choose a reason for hiding this comment

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

The href attributes for navigation links and the logo are currently set to /. If these are meant to navigate to specific sections or the homepage, they should be updated with the correct URLs to ensure proper navigation.

</li>
</ul>
</nav>
</header>
</body>
</html>
58 changes: 58 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
:root {
--main-blue-color: #00acdc;
}

body {
margin: 0;
}

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

Choose a reason for hiding this comment

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

Consider adding a background-color to the header to ensure it stands out against the rest of the page content.

}

.navigation {
margin: 0;
}

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

.link-item {
list-style: none;
line-height: 60px;
position: relative;
}

.link-item:not(:last-child) {
margin-right: 20px;
margin-left: 20px;
}

.link-item a {
text-decoration: none;
color: #000;

Choose a reason for hiding this comment

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

The color for the links is set to #000, which is black. Ensure that this provides enough contrast against the background for accessibility purposes.

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

.link-item a:hover,
.link-item a.is-active,
.link-item a:active{
color: var(--main-blue-color);
}

.link-item a:hover::after,
.link-item a:active::after {
Comment on lines +45 to +52

Choose a reason for hiding this comment

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

The ::after pseudo-element should be used for the blue line below the active link, not just on hover. This is crucial for indicating the current active page to users. Please ensure that the active link styling includes the ::after pseudo-element.

content: '';
position: absolute;
bottom: 0;
border-bottom: 4px solid var(--main-blue-color);

Choose a reason for hiding this comment

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

The border-bottom property is used to create an underline effect on hover. Ensure that this effect is visually appealing and consistent with the overall design of the site.

border-radius: 8px;
display: block;
z-index: 1;
width: 100%;
}
Loading