This commit is contained in:
Николай Полтщук 2023-08-03 18:47:04 +03:00
parent 85773bd7af
commit 2e4f15717b
3 changed files with 117 additions and 29 deletions

View File

@ -21,10 +21,6 @@
width: 100%; width: 100%;
} }
@media (max-width: 430px) {
padding: 8px 13px 8px;
}
a { a {
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
@ -47,10 +43,6 @@
align-items: center; align-items: center;
position: relative; position: relative;
@media (max-width: 430px) {
justify-content: space-between;
}
p { p {
color: #6f6f6f; color: #6f6f6f;
font-weight: 500; font-weight: 500;
@ -90,10 +82,6 @@
color: #6f6f6f; color: #6f6f6f;
right: 0; right: 0;
top: -35%; top: -35%;
@media (max-width: 430px) {
display: none;
}
} }
} }
} }

View File

@ -44,6 +44,7 @@ export const Tracker = () => {
const [allCompletedTasks, setAllCompletedTasks] = useState([]); const [allCompletedTasks, setAllCompletedTasks] = useState([]);
const [modalCreateProject, setModalCreateProject] = useState(false); const [modalCreateProject, setModalCreateProject] = useState(false);
const tabs = ['projectsTab', 'tasksTab', 'archiveTab']
useEffect(() => { useEffect(() => {
setLoader(true); setLoader(true);
@ -135,28 +136,28 @@ export const Tracker = () => {
<div className="tracker__tabs"> <div className="tracker__tabs">
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<div <div
className={tab === 1 ? "tab active-tab" : "tab"} className={tab === 1 ? "tab active-tab projectsTab" : "tab projectsTab"}
onClick={() => toggleTabs(1)} onClick={() => toggleTabs(1)}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
<p>Проекты </p> <p>Проекты </p>
</div> </div>
<div <div
className={tab === 2 ? "tab active-tab" : "tab"} className={tab === 2 ? "tab active-tab tasksTab" : "tab tasksTab"}
onClick={() => toggleTabs(2)} onClick={() => toggleTabs(2)}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
<p>Все мои задачи</p> <p>Все мои задачи</p>
</div> </div>
<div <div
className={tab === 3 ? "tab active-tab" : "tab"} className={tab === 3 ? "tab active-tab archiveTab" : "tab archiveTab"}
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />
<p>Архив</p> <p>Архив</p>
</div> </div>
</div> </div>
<div className="tracker__tabs__content"> <div className={`tracker__tabs__content ${tabs[tab - 1]}`}>
<div <div
className={ className={
tab === 1 tab === 1

View File

@ -46,6 +46,15 @@
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
height: 60px; height: 60px;
@media (max-width: 650px) {
padding: 0 15px;
background: none;
justify-content: space-between;
position: relative;
top: 15px;
height: auto;
}
} }
.tab { .tab {
@ -79,6 +88,19 @@
white-space: nowrap; white-space: nowrap;
} }
} }
@media (max-width: 650px) {
border-radius: 10px;
flex-direction: column;
padding: 20px;
align-items: start;
row-gap: 20px;
height: auto !important;
p {
margin-left: 0;
}
}
} }
.active-tab { .active-tab {
@ -98,6 +120,12 @@
filter: invert(0%) sepia(0%) saturate(2411%) hue-rotate(-25deg) filter: invert(0%) sepia(0%) saturate(2411%) hue-rotate(-25deg)
brightness(118%) contrast(119%); brightness(118%) contrast(119%);
} }
@media (max-width: 650px) {
border-radius: 10px;
align-items: start;
top: 0;
}
} }
&__content { &__content {
@ -119,11 +147,12 @@
align-items: center; align-items: center;
@media (max-width: 785px) { @media (max-width: 785px) {
row-gap: 25px;
justify-content: center; justify-content: center;
} }
@media (max-width: 460px) { @media (max-width: 460px) {
padding: 15px; padding: 0 15px;
} }
.no-projects { .no-projects {
@ -172,17 +201,17 @@
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
} }
@media (max-width: 650px) {
height: 40px;
font-size: 12px;
}
} }
.create-newProject { .create-newProject {
display: flex; display: flex;
align-items: center; align-items: center;
@media (max-width: 450px) {
flex-direction: column;
row-gap: 15px;
}
p { p {
margin-left: 32px; margin-left: 32px;
font-weight: 400; font-weight: 400;
@ -192,8 +221,6 @@
@media (max-width: 450px) { @media (max-width: 450px) {
max-width: none; max-width: none;
margin-left: 0;
text-align: center;
} }
} }
} }
@ -1104,13 +1131,22 @@
&__info { &__info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 730px; max-width: 535px;
@media (max-width: 820px) {
text-align: center;
max-width: none;
}
h5 { h5 {
font-weight: 700; font-weight: 700;
font-size: 20px; font-size: 20px;
line-height: 24px; line-height: 24px;
margin-bottom: 0; margin-bottom: 0;
@media (max-width: 820px) {
font-size: 19px;
}
} }
p { p {
@ -1130,6 +1166,10 @@
img { img {
width: 40px; width: 40px;
} }
@media (max-width: 820px) {
justify-content: center;
}
} }
&__project { &__project {
@ -1146,6 +1186,19 @@
font-size: 14px; font-size: 14px;
} }
} }
@media (max-width: 820px) {
row-gap: 10px;
flex-direction: column;
}
@media (max-width: 650px) {
background-color: white;
}
@media (max-width: 450px) {
padding: 12px 15px;
}
} }
} }
} }
@ -1158,7 +1211,7 @@
display: flex; display: flex;
column-gap: 28px; column-gap: 28px;
@media (max-width: 880px) { @media (max-width: 1100px) {
flex-direction: column; flex-direction: column;
row-gap: 20px; row-gap: 20px;
} }
@ -1191,6 +1244,10 @@
font-size: 15px; font-size: 15px;
} }
} }
@media (max-width: 450px) {
flex-wrap: wrap;
}
} }
&__tasksWrapper { &__tasksWrapper {
@ -1234,7 +1291,6 @@
background: #f1f1f1; background: #f1f1f1;
border-radius: 12px; border-radius: 12px;
padding: 12px 42px 7px 32px; padding: 12px 42px 7px 32px;
transition: 0.4s;
&:hover { &:hover {
transform: scale(0.99); transform: scale(0.99);
@ -1294,6 +1350,15 @@
} }
} }
} }
@media (max-width: 740px) {
flex-direction: column;
padding: 10px 20px;
}
@media (max-width: 650px) {
background-color: white;
}
} }
&__tasks { &__tasks {
@ -1303,7 +1368,7 @@
width: 65%; width: 65%;
overflow: hidden; overflow: hidden;
@media (max-width: 880px) { @media (max-width: 1100px) {
width: 100%; width: 100%;
} }
@ -1331,6 +1396,11 @@
max-width: 150px; max-width: 150px;
} }
@media (max-width: 450px) {
margin-left: 0;
max-width: none;
}
input { input {
width: 100%; width: 100%;
padding-left: 10px; padding-left: 10px;
@ -1356,8 +1426,9 @@
max-height: 450px; max-height: 450px;
padding-right: 15px; padding-right: 15px;
@media (max-width: 880px) { @media (max-width: 1100px) {
width: 100%; width: 100%;
min-height: auto;
} }
} }
@ -1373,9 +1444,37 @@
color: #111112; color: #111112;
text-align: center; text-align: center;
} }
@media (max-width: 650px) {
background-color: white;
}
} }
} }
} }
} }
@media (max-width: 650px) {
&__content {
padding: 28px 0;
.project {
background-color: white;
max-width: 394px;
}
}
.projectsTab {
background-color: #DFF1FF;
}
.tasksTab {
background-color: #E8FFEB;
}
.archiveTab {
background-color: #FFECEF;
}
}
} }
} }