-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
base: master
Are you sure you want to change the base?
add task solution #5742
Conversation
There was a problem hiding this 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:
-
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. -
Flex Gap Property: The
gap
property used in thenav ul
selector is not supported in tests. Please use margins for spacing instead. -
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.
-
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> |
There was a problem hiding this comment.
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="#"> |
There was a problem hiding this comment.
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
<img | ||
src="./images/logo.png" | ||
alt="Moyo" | ||
width="40px" | ||
height="40px" | ||
/> |
There was a problem hiding this comment.
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
<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> |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
height: 60px; | ||
line-height: 60px; |
There was a problem hiding this comment.
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.
nav a.is-active { | ||
color: #00acdc; | ||
text-transform: uppercase; | ||
position: relative; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this 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:
-
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. -
Flex Gap Property: The
gap
property in thenav ul
selector is not supported in tests. Use margins for spacing instead. -
CSS Variable for Blue Color: Define a CSS variable for the blue color
#00acdc
to enhance maintainability. -
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! ✨
<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> |
There was a problem hiding this comment.
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.
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
https://ValentynaD.github.io/layout_moyo-header/
https://ValentynaD.github.io/layout_moyo-header/report/html_report/