mobile -450px

This commit is contained in:
yousifpa98
2025-01-21 21:49:52 +01:00
parent 173db8f199
commit 800c99fac8
13 changed files with 87 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ const SwitchBtn = styled.button`
`; `;
const SwitchContainer = styled.div` const SwitchContainer = styled.div`
grid-area: 8 / 4 / 10 / 5; grid-area: 8 / 4 / 10 / 5; /* Default grid-area */
transition: background-color 1s ease; transition: background-color 1s ease;
background-color: ${(props) => background-color: ${(props) =>
props.colormode === "dark" ? "#131862" : "#69d0ff"}; props.colormode === "dark" ? "#131862" : "#69d0ff"};
@@ -32,12 +32,21 @@ const SwitchContainer = styled.div`
${(props) => (props.colormode === "dark" ? "#1e2be0" : "#9bdfff")}; ${(props) => (props.colormode === "dark" ? "#1e2be0" : "#9bdfff")};
position: relative; position: relative;
/* Media query for max-width: 450px */
@media (max-width: 450px) { @media (max-width: 450px) {
grid-area: 18 / 4 / 20 / 5; grid-area: 14 / 4 / 16 / 5;
}
/* Media query for max-width: 450px when parent has .gridContainer.contact */
@media (max-width: 450px) {
.gridContainer.contact & {
grid-area: 8/4/10/4; /* Custom grid-area for this scenario */
}
} }
`; `;
const StyledSunIcon = styled(SunIcon)` const StyledSunIcon = styled(SunIcon)`
fill: #fff145; fill: #fff145;
`; `;

View File

@@ -26,7 +26,7 @@ const Contact = () => {
setAnimation(""); // Clear animation to prevent re-triggering setAnimation(""); // Clear animation to prevent re-triggering
}; };
return ( return (
<div className="gridContainer"> <div className="gridContainer contact">
<LangSelect /> <LangSelect />
<Mail /> <Mail />
<Switch /> <Switch />

View File

@@ -161,3 +161,9 @@
transform: translate(-25%, -25%) rotate(30deg) scale(1.05); transform: translate(-25%, -25%) rotate(30deg) scale(1.05);
} }
} }
@media screen and (max-width: 450px) {
.contactTile {
grid-area: 2/1/6/5;
}
}

View File

@@ -57,16 +57,27 @@
@media screen and (max-width: 450px) { @media screen and (max-width: 450px) {
.gridContainer { .gridContainer {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(19, 1fr); grid-template-rows: repeat(15, 1fr);
min-width: 350px; min-width: 350px;
width: 100%; width: 100%;
} }
.gridContainer.contact {
grid-template-rows: repeat(9, 1fr);
}
.gridContainer.contact .github {
grid-area: 6 / 3 / 8 / 5;
}
.gridContainer.contact .linkedIn {
grid-area: 6 / 1 / 8 / 3;
}
.gridContainer .github { .gridContainer .github {
grid-area: 16 / 3 / 18 / 5; grid-area: 12 / 3 / 14 / 5;
} }
.gridContainer .linkedIn { .gridContainer .linkedIn {
grid-area: 16 / 1 / 18 / 3; grid-area: 12 / 1 / 14 / 3;
} }
.gridContainer .linkedIn .linkedInIcon, .gridContainer .linkedIn .linkedInIcon,

View File

@@ -21,6 +21,6 @@
@media screen and (max-width: 450px) { @media screen and (max-width: 450px) {
.hero { .hero {
grid-area: 2 / 1 / 5 / 5; grid-area: 2 / 1 / 4 / 5;
} }
} }

View File

@@ -15,6 +15,10 @@
@media (max-width: 450px) { @media (max-width: 450px) {
.langSelect { .langSelect {
grid-area: 18/1/19/4; grid-area: 14/1/15/4;
}
.gridContainer.contact .langSelect {
grid-area: 8/1/9/4;
} }
} }

View File

@@ -30,6 +30,10 @@
@media (max-width: 450px) { @media (max-width: 450px) {
.eMail { .eMail {
grid-area: 19/1/20/4; grid-area: 15/1/16/4;
}
.gridContainer.contact .eMail {
grid-area: 9/1/10/4;
} }
} }

View File

@@ -67,7 +67,8 @@
gap: 0.5rem; gap: 0.5rem;
} }
.projectCard.light .projectInfo h3 span, .projectCard.light .projectJob{ .projectCard.light .projectInfo h3 span,
.projectCard.light .projectJob {
color: rgb(90, 90, 90); color: rgb(90, 90, 90);
} }
@@ -77,4 +78,12 @@
.projectCard.light .socialIcon:hover { .projectCard.light .socialIcon:hover {
fill: #6e6e6e; fill: #6e6e6e;
} }
@media screen and (max-width: 450px) {
.projectCard {
width: 100%;
align-items: center;
justify-content: center;
}
}

View File

@@ -15,3 +15,19 @@
gap: 1rem; gap: 1rem;
width: 100%; width: 100%;
} }
@media screen and (max-width: 450px) {
.projectsMain {
grid-area: 2/1/12/5;
align-items: center;
justify-content: center;
}
.projectsDiv {
flex-wrap: nowrap;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
}

View File

@@ -11,3 +11,11 @@
.specialties.light .specialtyText { .specialties.light .specialtyText {
color: #333; color: #333;
} }
@media screen and (max-width: 450px) {
.specialties {
grid-area: 4 / 1 / 7 / 5;
}
}

View File

@@ -14,6 +14,6 @@
@media screen and (max-width: 450px) { @media screen and (max-width: 450px) {
.tallContent { .tallContent {
grid-area: 9 / 1 / 16 / 5; grid-area: 7 / 1 / 12 / 5;
} }
} }

View File

@@ -39,3 +39,10 @@
.tallContentAbout.light .funFactList li p { .tallContentAbout.light .funFactList li p {
color: #333; color: #333;
} }
@media screen and (max-width: 450px) {
.tallContentAbout {
grid-area: 7 / 1 / 12 / 5;
/* height: fit-content; */
}
}

View File

@@ -115,7 +115,7 @@
@media screen and (max-width: 450px) { @media screen and (max-width: 450px) {
.techStackContainer { .techStackContainer {
grid-area: 5 / 1 / 9 / 5; grid-area: 4 / 1 / 7 / 5;
max-height: 1110px; max-height: 1110px;
} }