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

moyo header task solution #3407

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

Conversation

Copy link

@Radoslaw-Czerniawski Radoslaw-Czerniawski left a 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/)

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">

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"

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"

Choose a reason for hiding this comment

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

You have forgotten about the # in href, this redirects to non-existing endpoint:
image
Please test your implementation before pr's

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">

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 {

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;
}

Copy link

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 {

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;

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.

Copy link

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;

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

Copy link

@darokrk darokrk left a 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">
Copy link

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 {
Copy link

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;
Copy link

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">
Copy link

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 :)

@arturgorniak arturgorniak requested a review from darokrk June 30, 2023 08:45
@arturgorniak
Copy link
Author

I made changes as sugested, can someone check this task too? I have waited quite a bit of time already and noone rated it.
mate-academy/layout_html-form#800

Copy link

@DorotaLeniecDev DorotaLeniecDev left a 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
Comment on lines 31 to 35
<a
href="#laptops"
class="nav__link"
data-qa="hover">Laptops & Computers
</a>

Choose a reason for hiding this comment

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

Should be:

Suggested change
<a
href="#laptops"
class="nav__link"
data-qa="hover">Laptops & Computers
</a>
<a
href="#laptops"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>

@arturgorniak
Copy link
Author

fixed already, sorry i forgot about the shadow previously.

Copy link

@Radoslaw-Czerniawski Radoslaw-Czerniawski left a 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>

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>

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.

4 participants