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 1 commit
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="#">

Choose a reason for hiding this comment

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

The href attribute for the logo link is currently set to #. If this link is intended to navigate to the homepage, consider setting it to the actual homepage URL.

<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="img-logo"
/>
</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>

Choose a reason for hiding this comment

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

The href attributes for the navigation links are all set to #. If these links are meant to navigate to specific sections or pages, consider updating them with the correct URLs.

</li>
</ul>
</nav>
</header>
</body>
</html>
56 changes: 56 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
: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 {
color: var(--main-blue-color);
}

.link-item a:hover::after {
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