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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

add task solution #5742

wants to merge 5 commits into from

Conversation

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Thank you for your hard work on this project! 😊 While you've made a great start, there are a few critical issues that need to be addressed to meet the core requirements:

  1. Universal Selector Usage: The use of the universal selector * in CSS for resetting margins and paddings can significantly impact performance and is against the guidelines. Please replace it with a more specific reset method.

  2. Flex Gap Property: The gap property used in the nav ul selector is not supported in tests. Please use margins for spacing instead.

  3. CSS Variable for Blue Color: A CSS variable for the blue color is required but not implemented. Please define and use a CSS variable for this purpose.

  4. HTML File Missing: The HTML file is crucial for verifying semantic tags, correct indentation, and other HTML-specific requirements. Please ensure it is included.

These issues are important for the functionality and compliance of your code with the task requirements. Once these are addressed, your solution will be much stronger. Keep up the great work, and I look forward to seeing your improvements! 🌟

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

</head>
<body>
<h1>Moyo header</h1>
<header>

Choose a reason for hiding this comment

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

Consider adding a <h1> tag within the header to provide a main heading for the page. This is important for accessibility and SEO, as it helps screen readers and search engines understand the main topic of the page.

src/index.html Outdated
<h1>Moyo header</h1>
<header>
<div class="logo">
<a href="#">

Choose a reason for hiding this comment

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

The <a> tag with the logo image should have a more descriptive href attribute instead of #, which typically indicates a placeholder link. If this is intended to link to the homepage, consider using a proper URL.

src/index.html Outdated
Comment on lines 27 to 32
<img
src="./images/logo.png"
alt="Moyo"
width="40px"
height="40px"
/>

Choose a reason for hiding this comment

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

Ensure that the alt attribute for the logo image is descriptive enough to convey the purpose of the image to users who rely on screen readers. 'Moyo' might be sufficient if it is the brand name, but consider adding more context if needed.

src/index.html Outdated
Comment on lines 35 to 60
<nav>
<ul>
<li>
<a
href="#"
class="is-active"
>
APPLE
</a>
</li>
<li><a href="#">SAMSUNG</a></li>
<li><a href="#">SMARTPHONES</a></li>
<li>
<a
href="#"
data-qa="hover"
>
LAPTOPS & COMPUTERS
</a>
</li>
<li><a href="#">GADGETS</a></li>
<li><a href="#">TABLETS</a></li>
<li><a href="#">PHOTO</a></li>
<li><a href="#">VIDEO</a></li>
</ul>
</nav>

Choose a reason for hiding this comment

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

Consider using <nav aria-label="Main navigation"> to provide a label for the navigation region. This improves accessibility by helping screen reader users understand the purpose of the navigation links.

body {
font-family: Roboto, sans-serif;

Choose a reason for hiding this comment

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

Consider setting a default font-size for the body to ensure consistent text sizing across different browsers and devices.

.logo img {
display: flex;
align-items: center;
height: 40px;

Choose a reason for hiding this comment

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

The display: flex; and align-items: center; properties on the .logo img selector are unnecessary since images are not flex containers. These properties should be applied to the parent container if needed.

src/style.css Outdated
Comment on lines 39 to 40
height: 60px;
line-height: 60px;

Choose a reason for hiding this comment

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

Using height and line-height together is a good technique for vertically centering text within a fixed height element. Ensure that the height is consistent with the design requirements.

Comment on lines +73 to +77
nav a.is-active {
color: #00acdc;
text-transform: uppercase;
position: relative;
}

Choose a reason for hiding this comment

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

The .is-active class is used to style the active link. Ensure that this class is applied correctly in the HTML to reflect the current page or section.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great effort on your submission! 🎉 While your code is on the right track, there are a few critical areas to address for full compliance with the task requirements:

  1. Universal Selector Usage: The use of the universal selector * for resetting margins and paddings can impact performance. Please replace it with a more specific reset method.

  2. Flex Gap Property: The gap property in the nav ul selector is not supported in tests. Use margins for spacing instead.

  3. CSS Variable for Blue Color: Define a CSS variable for the blue color #00acdc to enhance maintainability.

  4. Accessibility: Consider adding more ARIA attributes or roles to improve accessibility, especially for the navigation menu.

These improvements will enhance the functionality and maintainability of your code. The decision to approve is to help you move forward with your learning journey. Please review the comments and make the necessary changes to improve your code. Keep up the good work and continue learning from these experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +25 to +62
<header>
<div class="logo">
<a href="http://localhost:8080/">
<img
src="./images/logo.png"
alt="Moyo_shop_Gadgets"
width="40px"
height="40px"
/>
</a>
</div>
<nav aria-label="Main navigation">
<ul>
<li>
<a
href="#"
class="is-active"
>
APPLE
</a>
</li>
<li><a href="#">SAMSUNG</a></li>
<li><a href="#">SMARTPHONES</a></li>
<li>
<a
href="#"
data-qa="hover"
>
LAPTOPS & COMPUTERS
</a>
</li>
<li><a href="#">GADGETS</a></li>
<li><a href="#">TABLETS</a></li>
<li><a href="#">PHOTO</a></li>
<li><a href="#">VIDEO</a></li>
</ul>
</nav>
</header>

Choose a reason for hiding this comment

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

Consider adding more ARIA attributes or roles to improve accessibility, especially for the navigation menu. This can help users with assistive technologies better understand the structure and purpose of the navigation elements.

Comment on lines +1 to +5
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

Using the universal selector * for resetting margins and paddings can significantly impact performance and is against the guidelines. Please replace it with a more specific reset method.

display: flex;
list-style: none;
align-items: center;
gap: 20px;

Choose a reason for hiding this comment

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

The gap property is not supported in tests. Please use margins for spacing instead.

}

nav a:hover {
color: #00acdc;

Choose a reason for hiding this comment

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

Consider defining a CSS variable for the blue color #00acdc to improve maintainability and comply with the task requirements.

}

nav a.is-active {
color: #00acdc;

Choose a reason for hiding this comment

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

Consider defining a CSS variable for the blue color #00acdc to improve maintainability and comply with the task requirements.

display: block;
width: 37px;
height: 4px;
background-color: #00acdc;

Choose a reason for hiding this comment

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

Consider defining a CSS variable for the blue color #00acdc to improve maintainability and comply with the task requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants