mobile home done
This commit is contained in:
@@ -4,5 +4,11 @@ main {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
/* padding: 2rem; */
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
main {
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import Hero from "./Hero";
|
import Hero from "./Hero";
|
||||||
import "../css/Home.css";
|
import "../css/Home.css";
|
||||||
import TechStack from "./TechStack";
|
import TechStack from "./TechStack";
|
||||||
@@ -10,16 +10,20 @@ import LinkedInIcon from "../assets/icons/socials/linkedin.svg?react";
|
|||||||
import GitHubIcon from "../assets/icons/socials/square-github.svg?react";
|
import GitHubIcon from "../assets/icons/socials/square-github.svg?react";
|
||||||
import Location from "./Location";
|
import Location from "./Location";
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
import { useState } from "react";
|
import { useTheme } from "../Context/ThemeContext";
|
||||||
import TallContent from "./TallContent";
|
import TallContent from "./TallContent";
|
||||||
import "../css/GridContainer.css";
|
import "../css/GridContainer.css";
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
const [isExpanded, setIsExpanded] = useState(false);
|
const [isExpanded, setIsExpanded] = useState(false);
|
||||||
|
const [showLocation, setShowLocation] = useState(window.innerWidth > 450);
|
||||||
|
const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth <= 450);
|
||||||
|
const { colormode } = useTheme();
|
||||||
|
|
||||||
const social = (url) => () => {
|
const social = (url) => () => {
|
||||||
window.open(url, "_blank", "noopener,noreferrer");
|
window.open(url, "_blank", "noopener,noreferrer");
|
||||||
};
|
};
|
||||||
|
|
||||||
const [hoverAnimation, setHoverAnimation] = useState("animate__headShake");
|
const [hoverAnimation, setHoverAnimation] = useState("animate__headShake");
|
||||||
|
|
||||||
const handleMouseEnter = (setAnimation) => {
|
const handleMouseEnter = (setAnimation) => {
|
||||||
@@ -29,6 +33,21 @@ const Home = () => {
|
|||||||
const handleAnimationEnd = (setAnimation) => {
|
const handleAnimationEnd = (setAnimation) => {
|
||||||
setAnimation(""); // Clear animation to prevent re-triggering
|
setAnimation(""); // Clear animation to prevent re-triggering
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handleResize = () => {
|
||||||
|
const isSmall = window.innerWidth <= 450;
|
||||||
|
setShowLocation(!isSmall);
|
||||||
|
setIsSmallScreen(isSmall);
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("resize", handleResize);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("resize", handleResize);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="gridContainer">
|
<div className="gridContainer">
|
||||||
<Hero
|
<Hero
|
||||||
@@ -38,36 +57,30 @@ const Home = () => {
|
|||||||
/>
|
/>
|
||||||
<TechStack
|
<TechStack
|
||||||
initialAnimation="animate__backInLeft"
|
initialAnimation="animate__backInLeft"
|
||||||
/* onMouseEnter={handleMouseEnter} */
|
|
||||||
onAnimationEnd={handleAnimationEnd}
|
onAnimationEnd={handleAnimationEnd}
|
||||||
isExpanded={isExpanded}
|
isExpanded={isExpanded}
|
||||||
onExpandToggle={() => setIsExpanded(!isExpanded)}
|
onExpandToggle={() => setIsExpanded(!isExpanded)}
|
||||||
/>
|
/>
|
||||||
|
{!isExpanded && (
|
||||||
{isExpanded ? (
|
<>
|
||||||
""
|
<LangSelect
|
||||||
) : (
|
initialAnimation="animate__zoomIn"
|
||||||
<LangSelect
|
onAnimationEnd={handleAnimationEnd}
|
||||||
initialAnimation="animate__zoomIn"
|
/>
|
||||||
/* onMouseEnter={handleMouseEnter} */
|
<Mail
|
||||||
onAnimationEnd={handleAnimationEnd}
|
initialAnimation="animate__zoomIn"
|
||||||
/>
|
onAnimationEnd={handleAnimationEnd}
|
||||||
|
/>
|
||||||
|
<Switch
|
||||||
|
initialAnimation="animate__zoomIn"
|
||||||
|
onAnimationEnd={handleAnimationEnd}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
{isExpanded ? (
|
{(!isSmallScreen || !isExpanded) && (
|
||||||
""
|
<TallContent
|
||||||
) : (
|
initialAnimation="animate__flipInY"
|
||||||
<Mail
|
onMouseEnter={handleMouseEnter}
|
||||||
initialAnimation="animate__zoomIn"
|
|
||||||
/* onMouseEnter={handleMouseEnter} */
|
|
||||||
onAnimationEnd={handleAnimationEnd}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{isExpanded ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<Switch
|
|
||||||
initialAnimation="animate__zoomIn"
|
|
||||||
/* onMouseEnter={handleMouseEnter} */
|
|
||||||
onAnimationEnd={handleAnimationEnd}
|
onAnimationEnd={handleAnimationEnd}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -77,23 +90,18 @@ const Home = () => {
|
|||||||
onAnimationEnd={handleAnimationEnd}
|
onAnimationEnd={handleAnimationEnd}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className="linkedIn container animate__animated animate__jackInTheBox"
|
className={`linkedIn container animate__animated animate__jackInTheBox `}
|
||||||
onClick={social("https://www.linkedin.com/in/yousifpaulus/")}
|
onClick={social("https://www.linkedin.com/in/yousifpaulus/")}
|
||||||
>
|
>
|
||||||
<LinkedInIcon className="linkedInIcon" />
|
<LinkedInIcon className="linkedInIcon" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="github container animate__animated animate__jackInTheBox"
|
className={`github container animate__animated animate__jackInTheBox `}
|
||||||
onClick={social("https://github.com/yousifpa98")}
|
onClick={social("https://github.com/yousifpa98")}
|
||||||
>
|
>
|
||||||
<GitHubIcon className="githubIcon" />
|
<GitHubIcon className="githubIcon" />
|
||||||
</div>
|
</div>
|
||||||
<Location />
|
{showLocation && <Location />}
|
||||||
<TallContent
|
|
||||||
initialAnimation="animate__flipInY"
|
|
||||||
onMouseEnter={handleMouseEnter}
|
|
||||||
onAnimationEnd={handleAnimationEnd}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ const Navigation = ({ initialAnimation, onMouseEnter, onAnimationEnd }) => {
|
|||||||
icon: AddressCardIcon,
|
icon: AddressCardIcon,
|
||||||
id: 2,
|
id: 2,
|
||||||
},
|
},
|
||||||
{
|
/* {
|
||||||
name: { enGB: "Experience", deDE: "Erfahrung" },
|
name: { enGB: "Experience", deDE: "Erfahrung" },
|
||||||
to: "/workExp",
|
to: "/workExp",
|
||||||
icon: SuitcaseIcon,
|
icon: SuitcaseIcon,
|
||||||
id: 3,
|
id: 3,
|
||||||
},
|
}, */
|
||||||
{
|
{
|
||||||
name: { enGB: "Projects", deDE: "Projekte" },
|
name: { enGB: "Projects", deDE: "Projekte" },
|
||||||
to: "/projects",
|
to: "/projects",
|
||||||
|
|||||||
@@ -31,8 +31,13 @@ const SwitchContainer = styled.div`
|
|||||||
border: 1px solid
|
border: 1px solid
|
||||||
${(props) => (props.colormode === "dark" ? "#1e2be0" : "#9bdfff")};
|
${(props) => (props.colormode === "dark" ? "#1e2be0" : "#9bdfff")};
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@media (max-width: 450px) {
|
||||||
|
grid-area: 18 / 4 / 20 / 5;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
const StyledSunIcon = styled(SunIcon)`
|
const StyledSunIcon = styled(SunIcon)`
|
||||||
fill: #fff145;
|
fill: #fff145;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -53,3 +53,25 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.gridContainer {
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
grid-template-rows: repeat(19, 1fr);
|
||||||
|
min-width: 350px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gridContainer .github {
|
||||||
|
grid-area: 16 / 3 / 18 / 5;
|
||||||
|
}
|
||||||
|
.gridContainer .linkedIn {
|
||||||
|
grid-area: 16 / 1 / 18 / 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gridContainer .linkedIn .linkedInIcon,
|
||||||
|
.gridContainer .github .githubIcon {
|
||||||
|
width: 60%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.hero p span {
|
.hero p span {
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -17,3 +18,9 @@
|
|||||||
.hero.light p span {
|
.hero.light p span {
|
||||||
color: rgb(40, 40, 40);
|
color: rgb(40, 40, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.hero {
|
||||||
|
grid-area: 2 / 1 / 5 / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,7 +6,15 @@
|
|||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.eng,
|
.eng,
|
||||||
.ger {
|
.ger {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 450px) {
|
||||||
|
.langSelect {
|
||||||
|
grid-area: 18/1/19/4;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,3 +14,13 @@
|
|||||||
.location.light .navIcon {
|
.location.light .navIcon {
|
||||||
fill: #333;
|
fill: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.location {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.location.container {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: .5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.emailAnchor {
|
.emailAnchor {
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -18,11 +20,16 @@
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.eMail.light .emailAnchor {
|
.eMail.light .emailAnchor {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eMail.light .copyright {
|
.eMail.light .copyright {
|
||||||
color: rgb(102, 102, 102);
|
color: rgb(102, 102, 102);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 450px) {
|
||||||
|
.eMail {
|
||||||
|
grid-area: 19/1/20/4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
grid-area: 1 / 9 / 9 / 12;
|
grid-area: 1 / 9 / 9 / 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.navList {
|
.navList {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -57,3 +58,18 @@
|
|||||||
.navigation.light .navIcon {
|
.navigation.light .navIcon {
|
||||||
fill: #333;
|
fill: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.navigation {
|
||||||
|
grid-area: 1/1/2/5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navList {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.navLink span {
|
||||||
|
display: none; /* Hide the text */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,10 +3,17 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.particleCanvas {
|
.particleCanvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.tallContent {
|
||||||
|
grid-area: 9 / 1 / 16 / 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -111,3 +111,16 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
.techStackContainer {
|
||||||
|
grid-area: 5 / 1 / 9 / 5;
|
||||||
|
max-height: 1110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techStackContainer.expanded {
|
||||||
|
grid-area: 5 / 1 / 11 / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user