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 added task solution #113

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

Conversation

aRabiej
Copy link

@aRabiej aRabiej commented Jun 30, 2023

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.

Looks good, left a few comments

@@ -1 +1,75 @@
/* Styles go here */
body {

Choose a reason for hiding this comment

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

One of the task requirements is to reset browsers default styles, setting margin: 0; only on the body is not enough. You reset the styles either by setting default values on all elements

* {
  margin: 0;
}

or by creating a new file reset.css with for example Meyer Reset and importing it to the main one -> this way is better as in meyers reset you have complete control over what elements you modify as they are all listed instead of blindly setting values with *

src/index.html Outdated
</head>
<body>
<h1>Moyo header</h1>
<header class="navigationBar">

Choose a reason for hiding this comment

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

Rather than using camel case for the classes you could use BEM methodology for naming, here it's optional however in later prs you will have to use it

<header class="navigationBar">
<a href="#home" class="nav_link">
<img src="images/logo.png" alt="icon of the website">
</a>

Choose a reason for hiding this comment

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

Here between the a and nav there should be an empty lines as they are siblings.
Generally there are a few rules regarding spacing your tags for the sake of codes redability:

  • siblings should have an empty line between each other
<div>
  <span></span>

  <p></p>
</div>

there are however a few exceptions from that rule, for example when you have a bunch of repeated tags like in your ul below:

<div>
  <p></p>
  <p></p>

  <ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>

src/index.html Outdated
<nav class="nav">
<ul class="nav_list">
<li class="nav_item">
<a href="https://" class="is-active nav_link">Apple</a>

Choose a reason for hiding this comment

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

These links now lead to a non existent site empty site, it would be better for them to lead to ids based on their values, here it would be -> href="#apple"

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.

Few more adjustments needed

src/style.css Outdated
}

.is-active {
color: #00acdc;

Choose a reason for hiding this comment

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

You are using this color 3 times, so it would be good to use here css variables to make color modification easier.
Create variable for the color :)

Copy link

Choose a reason for hiding this comment

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

Bump this comment you can declare a variable in .css as example: --blue: #1e90ff; and then you use it where do you need as an example color: var(--blue); or background-color: var(--blue);

src/style.css Outdated
Comment on lines 20 to 21
padding: 0;
margin: 0;

Choose a reason for hiding this comment

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

You can remove this padding and margin from this selector as your reset.css will do the job of reseting padding and margins:

Suggested change
padding: 0;
margin: 0;

src/style.css Outdated

.nav_item {
position: relative;
padding: 0;

Choose a reason for hiding this comment

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

Same here

Suggested change
padding: 0;

src/style.css Outdated
Comment on lines 40 to 48
.icon {
width: 40px;
height: 40px;
top: 10px;
left: 50px;
position: absolute;
margin: 0;
padding: 0;
}

Choose a reason for hiding this comment

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

This class is not used - remove outdated codebase

@aRabiej aRabiej changed the title added task solution MOYO header added task solution Jul 3, 2023
@aRabiej aRabiej requested a review from DorotaLeniecDev July 3, 2023 17:17
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.

Small improvements from my site 😃

src/style.css Outdated
@@ -1 +1,62 @@
/* Styles go here */
body {
margin: 0;
Copy link

Choose a reason for hiding this comment

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

You don't need this rule if you imported reset.css file :) it already has that

src/style.css Outdated
}

.is-active {
color: #00acdc;
Copy link

Choose a reason for hiding this comment

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

Bump this comment you can declare a variable in .css as example: --blue: #1e90ff; and then you use it where do you need as an example color: var(--blue); or background-color: var(--blue);

@aRabiej aRabiej requested a review from darokrk July 4, 2023 11:14
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.

Looking good now :)

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