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 #5824

Open
wants to merge 3 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://MiniMixer.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://MiniMixer.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
48 changes: 47 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,54 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="index.html">
<img
src="images/logo.png"
alt="Moyo-logo"

Choose a reason for hiding this comment

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

Consider making the 'alt' attribute for the logo image more descriptive, such as 'Moyo Company Logo', to improve accessibility.

class="logo"
/>
</a>

<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a class="is-active section">Apple</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a class="section">Samsung</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a class="section">Smartphones</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

class="section"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="nav-item">
<a class="section">Gadgets</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a class="section">Tablets</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a class="section">Photo</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
<li class="nav-item">
<a class="section">Video</a>

Choose a reason for hiding this comment

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

The anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'.

</li>
</ul>
</nav>
</header>
</body>
</html>
67 changes: 67 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
html {
margin: 0;
padding: 0;

Choose a reason for hiding this comment

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

Redundant

Suggested change
html {
margin: 0;
padding: 0;
html {

font-family: Roboto, Arial, sans-serif;
}

body {
margin: 0;

--active-color: #00acdc;
}

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

.logo {
margin: 10px 0;
}

Choose a reason for hiding this comment

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

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


.nav {
display: flex;
}

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

.nav-item {
margin-right: 20px;
}

.nav-item:last-child {
margin-right: 0;
}

.section {
display: flex;
align-items: center;
text-transform: uppercase;
text-decoration: none;
height: 60px;
font-size: 12px;
font-weight: 500;
}

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

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

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