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

fixed moyo header #5394

Closed
wants to merge 4 commits into from
Closed

Conversation

TaniaFedortsi
Copy link

  • [х] Header height is set in 1 place (for the links)

  • [х] Content is vertically centered (for any header height)

  • [х] CSS is used to show all letters in Uppercase (don't type them in HTML)

  • [х] Logo is an image wrapped with a link

  • [х] CSS Variable is used for a blue color

  • [х] Pseudo-element is used for a blue line below the active link

  • [х] Code follows all the Code Style Rules ❗️

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.

It looks like you've made a great effort with your code! 👍 However, there are a few issues that need to be addressed before we can approve the pull request. Please take a look at the comments about using fallback fonts, avoiding fixed container sizes, not using the * selector for performance reasons, fixing the href attribute, improving code readability with empty lines, proper attribute formatting, and indentation. Once you've made these adjustments, your code will be even better! Keep up the good work, and let's get these changes made! 💪

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

src/index.html Outdated
Comment on lines 20 to 98
<header class="main-header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="Company Logo"
/>
</a>
<nav>
<ul class="nav-menu">
<li>
<a
href="#"
class="nav-link is-active"
>
APPLE
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
SAMSUNG
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
SMARTPHONES
</a>
</li>
<li>
<a
href="#"
class="nav-link"
data-qa="hover"
>
LAPTOPS & COMPUTERS
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
GADGETS
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
TABLETS
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
PHOTO
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
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.

Remember to add empty lines between multiline sibling blocks of HTML. There should be an empty line between the <a> and <nav> tags to improve readability.

Comment on lines +21 to +28
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="Company Logo"
/>

Choose a reason for hiding this comment

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

Each attribute should start on a new line with 2-space indentation when there are more than two attributes or attribute values are long. This applies to the <a> tag on lines 21-24 and the <img> tag on lines 25-28.

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

Choose a reason for hiding this comment

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

Add empty lines between multiline sibling elements. There should be an empty line between each <li> block to improve readability.

Comment on lines +33 to +38
<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.

The href attribute in the <a> tag should not contain spaces. Use a meaningful reference or # if the link is a placeholder.

src/index.html Outdated
</body>
</html>

</html>

Choose a reason for hiding this comment

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

Remove the duplicate closing </html> tag. There should only be one closing </html> tag at the end of the document.

src/style.css Outdated
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.

Don't use the * selector as it impacts the performance. Set styles only for elements that require them. Zeroing out your margins, paddings, or other styles with * is still inefficient for the browser.

src/style.css Outdated
Comment on lines 12 to 22
.main-header {
width: 100%;
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
padding: 0 50px;
border-bottom: 1px solid #ddd;
position: relative;
}

Choose a reason for hiding this comment

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

Don't fix container sizes like width and height unless there is a specific requirement for that. Let the content size dictate the container's size to avoid overflow or accidental scroll bars.

src/style.css Outdated
Comment on lines 7 to 10
body {
font-family: Roboto, sans-serif;
background-color: #f9f9f9;
}

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. For example: font-family: Roboto, Arial, sans-serif;.

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