-
-
Notifications
You must be signed in to change notification settings - Fork 617
Leila Farsani-Karma-Clone-Week2 #517
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
Conversation
jonnywyatt
left a comment
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.
Really good work - it looks like the design, and you've used flexbox and semantic HTML effectively!
css/style.css
Outdated
| @@ -1,19 +1,189 @@ | |||
| :root{ | |||
| --grey-dark: #363434; | |||
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 is a really good use of CSS variables! Did you learn about them in the lesson?
| </nav> | ||
| </header> | ||
| <main> | ||
| <section class="p1"> |
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.
Really good clean markup structure, well done. You've used header, main, footer at the top level. <section /> is a good choice for the containers below that (rather than article, because that's for content that could be shared / syndicated with other sites).
| Everyone needs alitte Karma. | ||
| </h2> | ||
| <div class="features"> | ||
| <div class="p2"> |
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.
Nearly all your CSS classnames are really clear and easy to understand. Maybe worth changing p1 and p2 as well so when you see them in the CSS you'll remember what they're for.
css/style.css
Outdated
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| margin-top: 4rem; |
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 is why you also needed a negative -60px margin on main, above.
Simpler to not style all sections, use a class selector instead and just target the sections you need to add this margin to, rather than all sections.
css/style.css
Outdated
| } | ||
| .p1 { | ||
| background-image: url(/img/first-background.jpg); | ||
| background-size: cover; |
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.
Great!
| <main> | ||
| <section class="p1"> | ||
| <h1>Introducing Karma</h1> | ||
| <h4>Bring WiFi with you, everywhere you go.</h4> |
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.
With the heading structure in a page, it's not valid to jump several levels like this from h1 to h4, so best as either a h2 or a div
index.html
Outdated
| <section class="p1"> | ||
| <h1>Introducing Karma</h1> | ||
| <h4>Bring WiFi with you, everywhere you go.</h4> | ||
| <button><a href="#">Learn More</a></button> |
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.
A link can't be wrapped in a button. This is best as just a <a />, then style that as a button.
| <div class="features"> | ||
| <div class="p2"> | ||
| <img src="img/icon-devices.svg" alt=""> | ||
| <h5>Internet for all devices </h5> |
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.
These are fine as <div />, they're not really subheadings as there's not content beneath them.
| </h2> | ||
| <div class="features"> | ||
| <div class="p2"> | ||
| <img src="img/icon-devices.svg" alt=""> |
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.
I think this could maybe use an alt, but interesting discussion to have
| </section> | ||
| </main> | ||
| <footer> | ||
| <span><h2>Join us on</h2></span> |
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.
No need to wrap a block element like h2 in a span, it will have no effect.
| </div> | ||
| </section> | ||
| </main> | ||
| <footer> |
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.
Good use of a semantic tag!
| } | ||
| display: flex; | ||
| flex-direction: column; | ||
| margin-top: -80px; |
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 layout will be simpler to develop if you remove this line, and also remove the margin-top on the section selector.
Remember, it's best not to style using element selectors, as it will affect every one of them and then you might have to add more CSS to work against those styles, as you have here.
| .part3 { | ||
| display: grid; | ||
| grid-template-rows: auto; | ||
| grid-template-columns: 2fr 3fr; |
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.
great! Good use of grid here
| } | ||
|
|
||
| .p3-img { | ||
| background-color: #363434; |
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.
Try to use your colour variables everywhere
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| gap: 2rem; |
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.
Great! This spaces out the two elements in the flex container
| .main2 { | ||
| display: flex; | ||
| flex-direction: row; | ||
| flex-wrap: wrap; |
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.
I don't think this line will help; you don't want the second section to wrap to the next line
| display: flex; | ||
| gap: 10px; | ||
| list-style: none; | ||
| } |
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.
ul has some left margin and padding by default, you could reset them to zero here to make it look closer to the design.
index.html
Outdated
| <h1>Order your Karma wifi device today!</h1> | ||
|
|
||
| <form action="#"> | ||
| <div class="fieldset"> |
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.
Calling this class fieldset is a bit confusing as the div isn't a fieldset. The fieldset tag is used to group several checkboxes or radio buttons together.
index.html
Outdated
| </div> | ||
| </div> | ||
|
|
||
| <div class="radio-box"> |
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 a fieldset tag instead of a div, because it's a group of related form controls (radio buttons)
index.html
Outdated
| </section> | ||
|
|
||
| <section class="section2-img"> | ||
| <img src="level-2/store-image_by-andrew-neel-unsplash.jpg" alt=""> |
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.
Maybe this is a decorative image, like the one in the new section on index.html, so you could use CSS background-image to add it
| font-style: italic; | ||
| } | ||
|
|
||
| .main2 { |
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.
In the design, the two sections under the main tag share the width 50% each. How can you do that here? Maybe grid would be simpler, to do that?
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
What did you find easy?
What did you find hard?
What do you still not understand?
Any other notes?