-
Notifications
You must be signed in to change notification settings - Fork 5k
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
moyo header task solution #3407
base: master
Are you sure you want to change the base?
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.
Apart from the comments left, your header should have a drop-shadow (I copied it from figma)
box-shadow: 0px 2px 4px 0px #0000000D;
readme.md
Outdated
@@ -1,7 +1,7 @@ | |||
# Moyo header | |||
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://arturgorniak.github.io/layout_moyo-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.
You removed (
in these links, should be:
[DEMO LINK](https://arturgorniak.github.io/layout_moyo-header/)
thx to that you demo link won't look like a full url but rather like this -> DEMO LINK
src/index.html
Outdated
@@ -9,6 +9,50 @@ | |||
<link rel="stylesheet" href="./style.css"> | |||
</head> | |||
<body> | |||
<h1>Moyo header</h1> | |||
<header class="header"> | |||
<a href="index.html" class="logo_link"> |
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.
it should lead to #
src/index.html
Outdated
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a href="index.html" class="logo_link"> | ||
<img src="./images/logo.png" |
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.
Again take a look at the checklist, when you have 2 attributes your tag should look like this:
<img src="./images/logo.png" alt="Moyo Header Logo">
however in this case as these attributes have some long values I would format it like so:
<img
src="./images/logo.png"
alt="Moyo Header Logo"
>
Take notice that I have change you alt attribute's value, be more precise when describing what should be displayed in the img. This alt attribute is the only thing that's visible for screen readers / robots reading your sites contents / people when your image doesn't load.
src/index.html
Outdated
</li> | ||
|
||
<li class="nav_item" data-qa="hover"> | ||
<a href="laptops" |
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.
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.
Also indent here needs to be corrected:
<a href="#laptops" class="nav_link">
Laptops & Computers
</a>
> | ||
</a> | ||
|
||
<nav class="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.
When you have repeated tags there is no need for empty lines between them, for example:
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
src/style.css
Outdated
display: flex; | ||
} | ||
|
||
.logo_link { |
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.
This should be enough here, rest is redundant:
.logo_link {
display: flex;
}
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.
Bump this Radek mention, you can refactor these styles as suggested
src/style.css
Outdated
padding: 0; | ||
} | ||
|
||
.nav_list > :last-child { |
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.
:last-child
should be used on the child class rather than parent so:
.nav_list > :last-child { margin-right: 0; }
.nav_item {
margin-right: 20px;
}
.nav_item:last-child {
margin-right: 0;
}
src/style.css
Outdated
align-items: center; | ||
font-size: 12px; | ||
line-height: 15px; | ||
padding: 23px 0; |
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.
Use rounded values divisible by 5 as it makes any calculations and positioning much easier.
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.
Bump this also, please set this padding value to 22px or 24px
src/style.css
Outdated
width: 100%; | ||
height: 4px; | ||
border-radius: 8px; | ||
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.
Generally it's a good practice to keep all your colors as variables at the beggining of the file in the :root
pseudoclass and later use these variables:
:root {
--light-blue: #00acdc;
}
...
background-color: var(--light-blue);
...
This is better for scalability of your app, it will be much easier to change your color scheme (or theme to dark for example) if all your colors are variables stored in one place. Also take notice of the naming of the variable I used here, don't use names likemain-color
but rather names that describe it like here light-blue
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.
UI looks good 🏅 few fixes needed and we got it 😃
src/index.html
Outdated
<li class="nav_item"> | ||
<a href="#smartphones" class="nav_link">Smartphones</a> | ||
</li> | ||
<li class="nav_item" data-qa="hover"> |
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 'data-qa' attribute has been added to the 'li' element, whereas it should be added to the 4th 'a' link as per the task description.
src/style.css
Outdated
display: flex; | ||
} | ||
|
||
.logo_link { |
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.
Bump this Radek mention, you can refactor these styles as suggested
src/style.css
Outdated
align-items: center; | ||
font-size: 12px; | ||
line-height: 15px; | ||
padding: 23px 0; |
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.
Bump this also, please set this padding value to 22px or 24px
src/index.html
Outdated
@@ -9,6 +9,41 @@ | |||
<link rel="stylesheet" href="./style.css"> | |||
</head> | |||
<body> | |||
<h1>Moyo header</h1> | |||
<header class="header"> | |||
<a href="#home" class="logo_link"> |
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.
Following the BEM naming convention please add a double underscore instead of one for block elements styles class="logo__link"
Please change that in the whole project HTML and CSS :)
I made changes as sugested, can someone check this task too? I have waited quite a bit of time already and noone rated it. |
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.
Add propper shadow for header, and deploy your page using npm run deploy
after the fixes so they are visible
src/index.html
Outdated
<a | ||
href="#laptops" | ||
class="nav__link" | ||
data-qa="hover">Laptops & Computers | ||
</a> |
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.
Should be:
<a | |
href="#laptops" | |
class="nav__link" | |
data-qa="hover">Laptops & Computers | |
</a> | |
<a | |
href="#laptops" | |
class="nav__link" | |
data-qa="hover" | |
> | |
Laptops & Computers | |
</a> |
fixed already, sorry i forgot about the shadow previously. |
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.
Accepted, layouts looks very good, do mind the spacing in future prs
src="./images/logo.png" | ||
alt="Moyo Header Logo" | ||
> | ||
</a> |
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.
Here should be an empty space, this a
tag is a sibling to nav
, generally the rule is (apart from the exception with repeated tags) that the siblings should have an empty space between them:
<div>
<span></span>
<p></p>
<div>
<ul>
<li></li>
<li></li>
</ul>
</div>
</div>
https://arturgorniak.github.io/layout_moyo-header/
https://arturgorniak.github.io/layout_moyo-header/report/html_report/