Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Krivorotova Tatyana/images/brooklyn_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/chicago.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/color_palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/mini_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/mini_rain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/mini_sun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/montue_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/portland.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/sanjose_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Krivorotova Tatyana/images/seattle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions Krivorotova Tatyana/index.html
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) -->
Copy link

@milkiwayRN milkiwayRN Jul 4, 2019

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

Copy link
Author

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.

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)

<img class="city-card-chicago__img" src="images/chicago.png" alt="">
<span>CHICAGO / 23&deg;</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&deg;</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&deg;</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&deg;</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&deg;</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&deg;</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&deg;</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&deg;</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&deg;</span>
</section>
</div>
</body>
</html>
108 changes: 108 additions & 0 deletions Krivorotova Tatyana/style.css
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;

Choose a reason for hiding this comment

The 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 display before width - do the same for other rules as well)

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

@tkkdev tkkdev Jul 4, 2019

Choose a reason for hiding this comment

The 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

Choose a reason for hiding this comment

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

you can use padding: 0; and margin: 0; for this purposes. It should overwrite padding-inline-start and margin-block-start, margin-block-end in modern browsers and will work for old

Copy link
Author

Choose a reason for hiding this comment

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