-
Notifications
You must be signed in to change notification settings - Fork 12
Cubes widget #8
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
base: master
Are you sure you want to change the base?
Cubes widget #8
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 |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <title>Cubes</title> | ||
| <meta charset="utf-8"> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <link rel="stylesheet" href="style.css"> | ||
| <link href="https://fonts.googleapis.com/css?family=Lato:700&display=swap" rel="stylesheet"> | ||
| </head> | ||
| <body> | ||
| <div class="weather-widget"><!-- Widget --> | ||
| <section class="weather-widget__city-card city-card-chicago"><!-- First card "Chicago" (img and name of the city) --> | ||
| <img class="city-card-chicago__img" src="images/chicago.png" alt=""> | ||
| <span>CHICAGO / 23°</span> | ||
| </section> | ||
| <section class="weather-widget__city-card city-card-seattle"><!-- Second card "Seattle" (img and name of the city) --> | ||
| <img class="city-card-seattle__img" src="images/seattle.png" alt=""> | ||
| <span>SEATTLE / 34°</span> | ||
| </section> | ||
| <section class="weather-widget__city-card city-card-brooklyn"><!-- Third card "Brooklyn" (img and name of the city) --> | ||
| <img class="city-card-brooklyn__img" src="images/brooklyn_cloud.png" alt=""> | ||
| <span>BROOKLYN / 55°</span> | ||
| </section> | ||
| <section class="weather-widget__city-card city-card-portland"><!-- Fourth card "Portland" (img and name of the city) --> | ||
| <img class="city-card-portland__img" src="images/portland.png" alt=""> | ||
| <span>PORTLAND / 27°</span> | ||
| </section> | ||
| <main class="weather-widget__city-card city-card-schedule"><!-- Fifth card with weather schedule (img and table) --> | ||
| <img class="city-card-schedule__img" src="images/montue_cloud.png" alt=""><!-- Img --> | ||
| <div class="city-card-schedule__schedule-table"><!-- Table with days of the week (day, img, degrees) --> | ||
| <div class="city-card-schedule__week-days-container"><!-- Container for list elements (element includes day, img, degrees) --> | ||
| <ul class="city-card-schedule__days-list days-list"><!-- List of element --> | ||
| <li class="days-list__list-elem"><!-- First element --> | ||
| <span class="days-list__list-text">MON</span><!-- Day --> | ||
| <img class="days-list__list-img" src="images/mini_rain.png" alt="" max-width="21" max-height="23"><!-- Img --> | ||
| <span class="days-list__list-text">22°</span><!-- Degree --> | ||
| </li> | ||
| <li class="days-list__list-elem"><!-- Second element --> | ||
| <span class="days-list__list-text">TUE</span><!-- Day --> | ||
| <img class="days-list__list-img" src="images/mini_rain.png" alt="" max-width="21" max-height="23"><!-- Img --> | ||
| <span class="days-list__list-text">19°</span><!-- Degree --> | ||
| </li> | ||
| <li class="days-list__list-elem"><!-- Third element --> | ||
| <span class="days-list__list-text">WEN</span><!-- Day --> | ||
| <img class="days-list__list-img" src="images/mini_cloud.png" alt="" max-width="21" max-height="23"><!-- Img --> | ||
| <span class="days-list__list-text">18°</span><!-- Degree --> | ||
| </li> | ||
| <li class="days-list__list-elem"><!-- Fourth element --> | ||
| <span class="days-list__list-text">THU</span><!-- Day --> | ||
| <img class="days-list__list-img" src="images/mini_sun.png" alt="" max-width="21" max-height="23"><!-- Img --> | ||
| <span class="days-list__list-text">14°</span><!-- Degree --> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| </main> | ||
| <section class="weather-widget__city-card city-card-sanjose"><!-- Sixth card "San Jose" (img and name of the city) --> | ||
| <img class="city-card-sanjose__img" src="images/sanjose_cloud.png" alt=""> | ||
| <span>SAN JOSE / 47°</span> | ||
| </section> | ||
| </div> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| body{ | ||
| margin: 0; | ||
| } | ||
|
|
||
| .weather-widget{ | ||
| width: 612px; | ||
| height: 408px; | ||
| margin: 0; | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| justify-content: center; | ||
| flex-direction: row; | ||
| font-family: 'Lato', sans-serif; | ||
| color: #FFFFFF; | ||
|
|
||
| } | ||
|
|
||
| .weather-widget__city-card{ | ||
| width: 204px; | ||
| height: 204px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .city-card-chicago{ | ||
| background-color: #00C0E2; | ||
| } | ||
|
|
||
| .city-card-seattle{ | ||
| background-color: #5AD998; | ||
| } | ||
|
|
||
| .city-card-brooklyn{ | ||
| background-color: #7558F8; | ||
| } | ||
|
|
||
| .city-card-portland{ | ||
| background-color: #E9C14D; | ||
| } | ||
|
|
||
| .city-card-schedule{ | ||
| justify-content: space-between; | ||
| background-color: #E55679; | ||
| } | ||
|
|
||
| .city-card-sanjose{ | ||
| background-color: #CB70D6; | ||
| } | ||
|
|
||
| .city-card-schedule__img{ | ||
| margin-top: 25px; | ||
| margin-right: 10px; | ||
| } | ||
|
|
||
| .city-card-schedule__schedule-table{ | ||
| width: 204px; | ||
| height: 99px; | ||
| background-color: #CB4C6C; | ||
| box-shadow: inset 0 0 30px rgba(0,0,0,0.15); | ||
| } | ||
|
|
||
| .city-card-schedule__week-days-container{ | ||
| width: 160px; | ||
| height: 67px; | ||
| margin-left: 23px; | ||
| margin-top: 19px; | ||
| display: flex; | ||
|
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. try to use some ordering for your css properties - there is good example http://codeguide.academy/html-css.html. Order should be consistent for all css rules (if in one you add |
||
| flex-direction: column; | ||
| justify-content: space-evenly; | ||
| } | ||
|
|
||
| .city-card-schedule__days-list{ | ||
| width: 155px; | ||
| height: 68px; | ||
| padding: 0; | ||
| margin: 0; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| list-style: none; | ||
| } | ||
|
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. The .city-card-schedule__days-list element's padding and margins styles have to be changed in order to be properly displayed on IE/Edge 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. you can use
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. It works! Thank you |
||
|
|
||
| .days-list__list-text{ | ||
| font-size: 9pt; | ||
| } | ||
|
|
||
| .days-list__list-elem{ | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .days-list__list-img{ | ||
| margin: 0; | ||
| } | ||
|
|
||
| .city-card-chicago__img, .city-card-sanjose__img, .city-card-portland__img, .city-card-brooklyn__img, .city-card-seattle__img{ | ||
| padding-top: 2px; | ||
| padding-bottom: 24px; | ||
| } | ||
|
|
||
| .city-card-sanjose__img{ | ||
| padding-top: 20px; | ||
| padding-bottom: 32px; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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 comments in html are excessive. In general, other developers should understand your markup by semantic (using suitable html tags, verbose class names, good naming for custom elements).
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.
Are class names that I've chosen correct and verbose enough? I mean, there was an issue with first version of names and I would like to know how good it is done now.
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 it's good now 😄 - for now I pretty easily can understand what you do in this file)