-
-
Notifications
You must be signed in to change notification settings - Fork 620
Scotland class 5 - karma clone #227
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,8 +3,16 @@ | |||||||||||||
|
|
||||||||||||||
| body { | ||||||||||||||
| font-family: 'Roboto', sans-serif; | ||||||||||||||
| font-size: 16px; | ||||||||||||||
| -webkit-font-smoothing: antialiased; | ||||||||||||||
| } | ||||||||||||||
| width:100%; | ||||||||||||||
| height:100%; | ||||||||||||||
|
Comment on lines
+8
to
+9
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We don't need these properties so we can remove them |
||||||||||||||
| color:#838994; | ||||||||||||||
| text-align: center; | ||||||||||||||
| line-height: 25px; | ||||||||||||||
| box-sizing: border-box; /*padding included in the box size*/ | ||||||||||||||
| display: block; /*each element as a block*/ | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Normally, it's not a good idea to turn every element into a block, because when we use inline elements like |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * Add your custom styles below | ||||||||||||||
|
|
@@ -16,4 +24,101 @@ body { | |||||||||||||
| * - When using Flexbox, remember the items you want to move around need to be inside a parent container set to 'display: flex' | ||||||||||||||
| */ | ||||||||||||||
|
|
||||||||||||||
| #nav-bar {position:fixed; | ||||||||||||||
| top:0; | ||||||||||||||
| height: 70px; | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We should use relative units where possible. Same applies to all the other uses of |
||||||||||||||
| width:100%; | ||||||||||||||
| right:40px; | ||||||||||||||
| background-color: white; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| #nav-bar ul {list-style-type:none; | ||||||||||||||
| display:flex; | ||||||||||||||
| justify-content: flex-end; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| #nav-bar ul a:hover {color:#F15B2A; | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+40
to
+41
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We should also add Also, for coding the formatting of the code matters in software teams. Typically, it's structured like in my suggestion. This applies to the whole file |
||||||||||||||
|
|
||||||||||||||
| #nav-bar img {height:60px; | ||||||||||||||
| width:200px; position: absolute; | ||||||||||||||
| left: 10px; | ||||||||||||||
| top: 10px; | ||||||||||||||
| z-index: -1; | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .nav-link {text-decoration:none; | ||||||||||||||
| color:darkgray; | ||||||||||||||
| font-weight:bolder; | ||||||||||||||
| display:block; | ||||||||||||||
| padding:8px; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .nav li:first-child > a {color: rgb(46, 44, 44);} | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| article {margin-top:70px;} | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| h1 {color: white; font-weight:lighter; font-size: 2em;} | ||||||||||||||
| h2 {color: white; font-weight:lighter;} | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We want the |
||||||||||||||
|
|
||||||||||||||
| #intro {background-image: url('https://raw.githubusercontent.com/willem-blauenberg/portfolio/master/projects/karma/img/first-background.jpg'); | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There's an image in the codebase that we can use, which is better than linking to an external image |
||||||||||||||
| height: 700px; | ||||||||||||||
| width:100%; | ||||||||||||||
| background-size: cover left; | ||||||||||||||
| background-position: center; | ||||||||||||||
| padding-top:50px; | ||||||||||||||
| text-align: center; | ||||||||||||||
| background-repeat: no-repeat; | ||||||||||||||
|
|
||||||||||||||
| display: flex; | ||||||||||||||
| justify-content: center; | ||||||||||||||
| align-items: center; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| #into-content {} | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
As this rule is empty, we should delete it because software teams don't leave empty code in the codebase |
||||||||||||||
|
|
||||||||||||||
| #learnbutton { background-color: #F15B2A; | ||||||||||||||
| border: none; | ||||||||||||||
| color: white; | ||||||||||||||
| padding: 15px 32px; | ||||||||||||||
| text-align: center; | ||||||||||||||
| text-decoration: none; | ||||||||||||||
| display: inline-block; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| #content {height:350px} | ||||||||||||||
|
|
||||||||||||||
| #content h1 {color: rgb(46, 44, 44); } | ||||||||||||||
|
|
||||||||||||||
| .service-img {width:100px; height:100px; } | ||||||||||||||
|
|
||||||||||||||
| .services {width:200px; | ||||||||||||||
| text-align:center; | ||||||||||||||
| display:inline-block; | ||||||||||||||
| float:center; | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| padding:10px; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .servicename {text-decoration: none; color:rgb(46, 44, 44);} | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| footer {height:220; | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
It looks like we're missing units here. Also, we should be using relative units like |
||||||||||||||
| text-align:center; | ||||||||||||||
| margin:auto; /* horizontally center the element within its container*/ | ||||||||||||||
| max-width: 60%; | ||||||||||||||
| border-top: 1px solid lightgrey;} | ||||||||||||||
|
|
||||||||||||||
| footer ul {margin:auto;} | ||||||||||||||
|
|
||||||||||||||
| footer li {padding:10px; | ||||||||||||||
| display:inline-block; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| footer ul li img { width: 30px; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| footer ul li img : hover {cursor:pointer; | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+122
to
+123
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The icons aren't clickable so we shouldn't add a mouse pointer on hover. If we want a mouse pointer on hover, we should put the icons in a link |
||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,11 +9,71 @@ | |||||||||
| <link rel="stylesheet" href="css/style.css"> | ||||||||||
| <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> | ||||||||||
| </head> | ||||||||||
|
|
||||||||||
| <body> | ||||||||||
|
|
||||||||||
| <!-- Add your HTML markup here --> | ||||||||||
| <!-- Remember: Use semantic HTML tags like <header>, <main>, <nav>, <footer>, <section> etc --> | ||||||||||
| <!-- All the images you need are in the 'img' folder --> | ||||||||||
|
|
||||||||||
| <!-- header starts here--> | ||||||||||
| <header id="header"> | ||||||||||
| <nav id="nav-bar"> | ||||||||||
|
Comment on lines
+20
to
+21
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Normally, software teams use classes for styling and not IDs. The same applies for the rest of this file |
||||||||||
| <img src= "img\karma-logo.svg" alt="Karma"> | ||||||||||
| <ul class="nav"> | ||||||||||
| <li> <a class="nav-link" href="#MeetKarma"> Meet Karma </a></li> | ||||||||||
| <li> <a class="nav-link" href="#Howitworks"> How it works </a> </li> | ||||||||||
| <li> <a class="nav-link" href="#Store"> Store </a> </li> | ||||||||||
| <li> <a class="nav-link" href="#Blog"> Blog </a> </li> | ||||||||||
| <li> <a class="nav-link" href="#Help"> Help </a></li> | ||||||||||
| <li> <a class="nav-link" href="#Login"> Login</a></li> | ||||||||||
| </ul> | ||||||||||
| </nav> | ||||||||||
| </header> <!--header ends here--> | ||||||||||
|
|
||||||||||
| <article> | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This seems like it should be a main, since we normally have |
||||||||||
| <!--Introduction starts here--> | ||||||||||
| <section id="intro"> | ||||||||||
| <div id="intro-content"> | ||||||||||
| <h1> Introducing Karma </h1> | ||||||||||
| <h2> Bring WiFi with you, everywhere you go.</h2> | ||||||||||
| <button type="button" id="learnbutton"> Learn More </button> | ||||||||||
| </div> | ||||||||||
| </section> | ||||||||||
| <!-- Introduction ends here--> | ||||||||||
|
|
||||||||||
| <!--content starts here--> | ||||||||||
| <section id="content"> | ||||||||||
| <h1> Everyone needs a little Karma.</h1> | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We should only have one |
||||||||||
|
|
||||||||||
| <div class= "services"> | ||||||||||
| <img class="service-img" src="img\icon-devices.svg" alt="Internet services"/> | ||||||||||
| <p > <a href = "" target="_blank" class="servicename" > Internet for all devices </a></p> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| <div class= "services"> | ||||||||||
| <img class="service-img" src="img\icon-coffee.svg" alt="Boost productivity"/> | ||||||||||
| <p class="services"> <a href = "" target="_blank" class="servicename" > Boost your productivity </a> </p> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| <div class= "services"> | ||||||||||
| <img class="service-img" src="img\icon-refill.svg" alt="Pay as You Go"/> | ||||||||||
| <p class="services"> <a href = "" target="_blank" class="servicename" > Pay as You Go </a> </p> | ||||||||||
| </div> | ||||||||||
| </section> | ||||||||||
| <!-- content ends here--> | ||||||||||
| </article> | ||||||||||
|
|
||||||||||
|
|
||||||||||
| <footer> | ||||||||||
| <p> Join us on </p> | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This seems like it could be a heading, so we could make it one |
||||||||||
| <ul> | ||||||||||
| <li id="twitter"> <img src="img\twitter-icon.svg" alt="twitter"> </li> | ||||||||||
| <li id="facebook"> <img src="img\facebook-icon.svg" alt="facebook"> </li> | ||||||||||
| <li id="instagram"> <img src="img\instagram-icon.svg" alt="instagram"> </li> | ||||||||||
| </ul> | ||||||||||
| <p> © Karma Mobility, Inc. </p> | ||||||||||
| </footer> | ||||||||||
|
|
||||||||||
| </body> | ||||||||||
| </html> | ||||||||||
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.
We should use relative units like
rem, especially forfont-size. If we use pixels, then if a user changes their browser default font size setting then the screen doesn't increase in size