fix adaptive Calendar

This commit is contained in:
Никита Губарь 2024-08-01 12:23:17 +03:00
parent 5cdf072551
commit a76725edf5
3 changed files with 50 additions and 8 deletions

View File

@ -117,25 +117,45 @@
} }
&__body { &__body {
div { &__week-days {
display: grid; display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
@media (max-width: 680px) {
display: none;
}
p { p {
color: #9babc5; color: #9babc5;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
} }
&-mobile {
display: none;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
@media (max-width: 680px) {
display: grid;
}
p {
color: #9babc5;
font-size: 14px;
font-weight: 500;
text-align: center;
}
}
} }
margin: 20px 0 20px; margin: 20px 0 20px;
} }
&__form { &__form {
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: repeat(7, 1fr);
justify-content: space-between; justify-content: space-between;
button { button {
@ -205,12 +225,10 @@
@media (max-width: 550px) { @media (max-width: 550px) {
width: 60px; width: 60px;
height: 35px;
} }
@media (max-width: 450px) { @media (max-width: 450px) {
width: 45px; width: 45px;
height: 35px;
} }
} }
} }
@ -265,6 +283,11 @@
} }
.form-box { .form-box {
background-color: #fafbfe; background-color: #fafbfe;
padding: 0 10px;
@media (max-width: 450px) {
padding: 0;
}
.form-hours { .form-hours {
color: #6dd077; color: #6dd077;
@ -284,6 +307,11 @@
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
margin: auto; margin: auto;
@media (max-width: 680px) {
font-weight: 700;
font-size: 10px;
}
} }
} }
.form-hours::before { .form-hours::before {

View File

@ -223,7 +223,7 @@ export const ProfileCalendarComponent = React.memo(
</div> </div>
<div className="calendar-component__body"> <div className="calendar-component__body">
<div> <div className="calendar-component__body__week-days">
<p>Понедельник</p> <p>Понедельник</p>
<p>Вторник</p> <p>Вторник</p>
<p>Среда</p> <p>Среда</p>
@ -232,6 +232,15 @@ export const ProfileCalendarComponent = React.memo(
<p>Суббота</p> <p>Суббота</p>
<p>Воскресенье</p> <p>Воскресенье</p>
</div> </div>
<div className="calendar-component__body__week-days-mobile">
<p>ПН</p>
<p>ВТ</p>
<p>СР</p>
<p>ЧТ</p>
<p>ПТ</p>
<p>СБ</p>
<p>ВС</p>
</div>
<div className="calendar-component__form"> <div className="calendar-component__form">
{calendar.map((week) => {calendar.map((week) =>

View File

@ -19,8 +19,13 @@
.summary__info { .summary__info {
padding-right: 25px; padding-right: 25px;
@media (max-width: 500px) { @media (max-width: 760px) {
padding-right: 5px; display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
row-gap: 25px;
padding: 25px;
} }
.summary__person { .summary__person {