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

ДЗ - Лекция 2 - 1. Компонент «Гистограмма» #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
47 changes: 47 additions & 0 deletions 04-lection2/01-histogram/histogram.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.histogramCard {
display: flex;
flex-wrap: wrap;
font-family: 'Inter', sans-serif;
padding: 24px;

Choose a reason for hiding this comment

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

16 24 24

font-size: 16px;
line-height: 24px;
color: var(--black);
border: 1px solid var(--grey-3);
border-radius: 8px;
}

.histogramCard__result {
flex-basis: 50%;

Choose a reason for hiding this comment

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

лишнее

margin: 0;

Choose a reason for hiding this comment

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

лишнее

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Без этого маржина большие отступы - наследуются от нормалайз.

opacity: 0.8;
text-align: left;

Choose a reason for hiding this comment

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

лишнее

}

.histogramCard__link {
flex-basis: 50%;

Choose a reason for hiding this comment

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

лишнее

margin: 0;

Choose a reason for hiding this comment

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

лишнее (что можно было бы - марджин слева 8px)

text-align: right;

Choose a reason for hiding this comment

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

лишнее

color: #4263EB;
}

.histogramCard__resultNumber {
flex-basis: 100%;

Choose a reason for hiding this comment

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

лишнее

margin-top: 6px;
margin-bottom: 39px;
font-size: 20px;
font-weight: 400;
}

.histogram {

Choose a reason for hiding this comment

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

наш блок называется как я вижу .histogramCard, так что - .histogramCard__chart?

display: flex;
flex-basis: 100%;

Choose a reason for hiding this comment

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

лишнее

flex-wrap: nowrap;
gap: 1px;
align-items: end;

Choose a reason for hiding this comment

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

и еще высоту фиксируем как 50px

}

.histogram__item {

Choose a reason for hiding this comment

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

.histogramCard__chartItem

background: #4263EB;
height: 50px;

Choose a reason for hiding this comment

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

чтобы здесь задавать в процентах

flex-grow: 1;
}
38 changes: 37 additions & 1 deletion 04-lection2/01-histogram/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@
<link rel="stylesheet" href="./histogram.css">
</head>
<body>

<div class="histogramCard">
<p class="histogramCard__result">Total orders</p>

Choose a reason for hiding this comment

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

чтобы result + link были на одном уровне и располагались по разных сторонам - нужно завернуть в общего родителя, флекс контейнер, и выравнивать

<p class="histogramCard__link">View all</p>

Choose a reason for hiding this comment

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

<a>

<h4 class="histogramCard__resultNumber">50254</h4>
<div class="histogram">
<div class="histogram__item" style="height: 50%"></div>
<div class="histogram__item" style="height: 35%"></div>
<div class="histogram__item"></div>
<div class="histogram__item" style="height: 85%"></div>
<div class="histogram__item" style="height: 60%"></div>
<div class="histogram__item" style="height: 20%"></div>
<div class="histogram__item" style="height: 5%"></div>
<div class="histogram__item" style="height: 55%"></div>
<div class="histogram__item" style="height: 75%"></div>
<div class="histogram__item" style="height: 95%"></div>
<div class="histogram__item"></div>
<div class="histogram__item" style="height: 10%"></div>
<div class="histogram__item" style="height: 50%"></div>
<div class="histogram__item" style="height: 25%"></div>
<div class="histogram__item" style="height: 80%"></div>
<div class="histogram__item" style="height: 30%"></div>
<div class="histogram__item"></div>
<div class="histogram__item"></div>
<div class="histogram__item" style="height: 95%"></div>
<div class="histogram__item" style="height: 60%"></div>
<div class="histogram__item" style="height: 10%"></div>
<div class="histogram__item" style="height: 5%"></div>
<div class="histogram__item" style="height: 25%"></div>
<div class="histogram__item" style="height: 50%"></div>
<div class="histogram__item" style="height: 75%"></div>
<div class="histogram__item"></div>
<div class="histogram__item" style="height: 55%"></div>
<div class="histogram__item" style="height: 45%"></div>
<div class="histogram__item" style="height: 70%"></div>
<div class="histogram__item"></div>
</div>
</div>
</body>
</html>
1 change: 0 additions & 1 deletion components/footer/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.footer {
font-family: 'Inter', sans-serif;
padding: 39px 160px 136px;

}

.footer__heading {
Expand Down
Loading