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

Develop #5361

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

Develop #5361

wants to merge 9 commits into from

Conversation

artuom2283
Copy link

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.

Hey there! It looks like there are a few important issues that need to be addressed before we can approve your Pull Request. 🛠️ Remember to use valid URL formats in your href attributes, stick to lowercase, and avoid spaces and special characters. Also, make sure your indentation is consistent with 2 spaces, and watch out for those empty selectors and unnecessary spaces between elements. Adding a fallback font-family will also improve cross-browser compatibility. Keep up the good work, and once these changes are made, your code will be in great shape! 💪

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

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

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 anchor tag should not contain spaces and should start with a # if it's an anchor link. In this case, it seems like it should be a path, so ensure it's a valid path without spaces.

src/index.html Outdated
<div class="nav-logo">
<a href="homepage">
<img
src="images\logo.png"

Choose a reason for hiding this comment

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

Use forward slashes (/) instead of backslashes (\) in the src attribute for consistency across different operating systems.

src/index.html Outdated
<ul>
<li class="nav-item is-active apple-active">
<a
href="APPLE"

Choose a reason for hiding this comment

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

The href attribute value APPLE should be lowercase and should not contain spaces. It's better to use a meaningful path or an anchor link starting with #.

src/index.html Outdated
</li>
<li class="nav-item is-active">
<a
href="LAPTOPS & COMPUTERS"

Choose a reason for hiding this comment

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

The href attribute value LAPTOPS & COMPUTERS contains spaces and special characters, which is not recommended. Use a valid URL format or an anchor link starting with #.

src/index.html Outdated
<nav class="nav">
<div class="nav-links">
<ul>
<li class="nav-item is-active apple-active">

Choose a reason for hiding this comment

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

Remove unnecessary spaces between sibling elements. There should be an empty line between multiline sibling elements, but not spaces.

src/style.css Outdated
}

html {
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 adding a fallback font-family for better cross-browser compatibility. For example, 'Roboto', Arial, sans-serif.

src/style.css Outdated
Comment on lines 21 to 23
margin-top: 10px;
margin-bottom: 10px;
height: 60px;

Choose a reason for hiding this comment

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

Be consistent with your vertical margins. It's recommended to add only top or only bottom margin, but not both to prevent potential margin collapse issues. In this case, you might want to remove either 'margin-top' or 'margin-bottom'.

src/style.css Outdated
justify-content: flex-end;
}

ul {

Choose a reason for hiding this comment

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

Avoid using tag names for styling. You should use classes instead of tag names like 'ul' to apply styles, except for the 'html' and 'body' tags.

src/style.css Outdated Show resolved Hide resolved
@artuom2283 artuom2283 closed this Sep 15, 2024
@artuom2283 artuom2283 reopened this Sep 15, 2024
Copy link

@vadiimvooo vadiimvooo left a comment

Choose a reason for hiding this comment

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

Good job, but you have to fix your code according to comments below.

src/style.css Outdated
Comment on lines 114 to 125
/* li.is-active::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 4px;
background-color: var(--link-color);
border-radius: 2px;
transform: scaleX(0);
transition: transform 0.15s ease-in-out;
} */

Choose a reason for hiding this comment

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

Remove commented code

src/style.css Outdated
justify-content: flex-end;
}

ul.nav-list {

Choose a reason for hiding this comment

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

remove tags from selectors

src/index.html Outdated
<nav class="nav">
<div class="nav-links">
<ul class="nav-list">
<li class="nav-item is-active apple-active">

Choose a reason for hiding this comment

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

Suggested change
<li class="nav-item is-active apple-active">
<li class="nav-item">

src/index.html Outdated
</a>
</div>
<nav class="nav">
<div class="nav-links">

Choose a reason for hiding this comment

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

Suggested change
<div class="nav-links">

src/index.html Outdated
<li class="nav-item is-active apple-active">
<a
href="#apple"
class="is-active"

Choose a reason for hiding this comment

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

Suggested change
class="is-active"
class="nav__link is-active"

src/index.html Outdated
apple
</a>
</li>
<li class="nav-item is-active">

Choose a reason for hiding this comment

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

Suggested change
<li class="nav-item is-active">
<li class="nav-item">

Choose a reason for hiding this comment

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

is-active is class which should be used for Apple link.

Choose a reason for hiding this comment

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

The same for other elements.

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Good job 👍
Let's improve your code
Add a blue color for all links when hovering
image

Remove margins
image

<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="nav-logo">

Choose a reason for hiding this comment

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

This div is redundant

Suggested change
<div class="nav-logo">

src/index.html Outdated
Comment on lines 40 to 41
</div>
<nav class="nav">

Choose a reason for hiding this comment

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

Suggested change
</div>
<nav class="nav">
</div>
<nav class="nav">

src/index.html Outdated
Comment on lines 50 to 51
</li>
<li class="nav-item">

Choose a reason for hiding this comment

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

Add the blank line between the links

Suggested change
</li>
<li class="nav-item">
</li>
<li class="nav-item">

src/index.html Outdated
<a href="#samsung">samsung</a>
</li>
<li class="nav-item">
<a href="#smartphones">smartphones</a>

Choose a reason for hiding this comment

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

Add classes everywhere

Suggested change
<a href="#smartphones">smartphones</a>
<a class="nav__link" href="#smartphones">smartphones</a>

src/style.css Outdated
align-items: center;
justify-content: space-between;
padding: 0 50px;
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
margin: 10px 0;

src/style.css Outdated
line-height: 60px;
}

li {

Choose a reason for hiding this comment

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

Use only class selector

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Hi, the demo link still not fixed from the previous review, you need to make a deploy again

src/style.css Outdated
}

.nav__link:hover {
color: var(--link-color) !important;

Choose a reason for hiding this comment

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

Don't use important

Suggested change
color: var(--link-color) !important;
color: var(--link-color);

src/style.css Outdated
Comment on lines 76 to 78
.nav-item:nth-of-type(1) .nav__link {
color: var(--link-color) !important;
}

Choose a reason for hiding this comment

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

Suggested change
.nav-item:nth-of-type(1) .nav__link {
color: var(--link-color) !important;
}
.nav__link {
color: var(--link-color);
}

src/style.css Outdated
color: var(--link-color) !important;
}

.nav__link[data-qa='hover']:hover {

Choose a reason for hiding this comment

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

Suggested change
.nav__link[data-qa='hover']:hover {
.nav__link:hover {

src/style.css Outdated
Comment on lines 102 to 120
.is-active:hover::after {
transform: scaleX(1);
}

.is-active:link {
color: black;
}

.is-active:visited {
color: grey;
}

.is-active:hover {
text-decoration-color: var(--link-color);
}

.nav-item.is-active.apple-active .nav__link {
color: var(--link-color);
}

Choose a reason for hiding this comment

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

Redundant

Suggested change
.is-active:hover::after {
transform: scaleX(1);
}
.is-active:link {
color: black;
}
.is-active:visited {
color: grey;
}
.is-active:hover {
text-decoration-color: var(--link-color);
}
.nav-item.is-active.apple-active .nav__link {
color: var(--link-color);
}

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Hi, the demo link still not fixed, you need to make a deploy after your changes, if you need help feel free in the fe_chat

src/index.html Outdated
Comment on lines 38 to 39
</a>
<nav class="nav">

Choose a reason for hiding this comment

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

Suggested change
</a>
<nav class="nav">
</a>
<nav class="nav">

src/style.css Outdated
align-items: center;
}

img {

Choose a reason for hiding this comment

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

Use class selector for image

Copy link
Author

Choose a reason for hiding this comment

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

image

you yourself asked to remove class nav-logo

src/style.css Outdated
Comment on lines 76 to 78
.nav__link[href='#apple'] {
color: var(--link-color);
}

Choose a reason for hiding this comment

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

Redundant

Suggested change
.nav__link[href='#apple'] {
color: var(--link-color);
}

Copy link
Author

Choose a reason for hiding this comment

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

image
image

can't do without .nav__link[href='#apple']

Choose a reason for hiding this comment

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

image and now it should work

src/style.css Outdated
Comment on lines 94 to 95
transform: scaleX(1);
transition: transform 0.15s ease-in-out;

Choose a reason for hiding this comment

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

Redundant

Suggested change
transform: scaleX(1);
transition: transform 0.15s ease-in-out;

@artuom2283
Copy link
Author

image
I have passed all the tests, what else do I need?

Copy link

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

don't hesitate to ask your questions in the chat

src/style.css Outdated
margin-left: 0;
}

.nav .nav__link {

Choose a reason for hiding this comment

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

Suggested change
.nav .nav__link {
.nav__link {

src/style.css Outdated
Comment on lines 76 to 78
.nav__link[href='#apple'] {
color: var(--link-color);
}

Choose a reason for hiding this comment

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

image and now it should work

@artuom2283
Copy link
Author

did everything you said)

Copy link

@lerastarynets lerastarynets left a comment

Choose a reason for hiding this comment

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

You've got this, keep pushing forward!

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.

6 participants