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

add task solution #5859

Open
wants to merge 1 commit 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://ditiselit.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://ditiselit.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
90 changes: 88 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,98 @@
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:wght@500&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<body class="page">
<header class="header">
<a
href="index.html"
class="logo"
>
<img
src="images/logo.png"
alt="moyo"
class="logo__img"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-active"
>
Apple
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Samsung
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Smartphones
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
data-qa="hover"

Choose a reason for hiding this comment

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

Ensure that the data-qa attribute is necessary and used correctly. If it's for testing purposes, make sure it's documented or used consistently across the project.

>
Laptops & Computers
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Gadgets
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Tablets
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Photo
</a>

Choose a reason for hiding this comment

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

Each navigation link should be wrapped in a <li> element to ensure semantic correctness and improve accessibility. Consider wrapping each <a> tag within its own <li> tag.

<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
75 changes: 74 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
body {
html {
font-family: Roboto, sans-serif;
font-style: normal;
line-height: normal;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
}
Comment on lines +2 to +7

Choose a reason for hiding this comment

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

Applying text-transform: uppercase; globally to the html element might be too restrictive. Consider applying this style to specific elements that require uppercase text to allow for more flexible text styling across the site.


:root {
--main-color: black;
--active-color: #00acdc;
}

.page {
margin: 0;
}

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

.logo__img {
display: block;
height: 40px;
width: 40px;
}

.nav__list {
list-style: none;
padding: 0;
margin: 0;
}

.nav__item {
display: flex;

Choose a reason for hiding this comment

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

The .nav__item class uses display: flex;, which might not be necessary if each navigation link is wrapped in its own <li> element. Consider reviewing the HTML structure to ensure semantic correctness and potentially simplify the CSS.

padding: 0;
margin: 0;
}

.nav__link {
display: block;
height: 60px;
line-height: 60px;
padding: 0;
text-decoration: none;
color: var(--main-color);
margin-right: 20px;
}

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

.nav__link:hover {
color: var(--active-color);
}

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

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