added some styling for bg + added tallContent component + animation
This commit is contained in:
@@ -11,6 +11,7 @@ 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 { useState } from "react";
|
||||||
|
import TallContent from "./TallContent";
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
const [hoverAnimation, setHoverAnimation] = useState("animate__headShake");
|
const [hoverAnimation, setHoverAnimation] = useState("animate__headShake");
|
||||||
@@ -49,6 +50,11 @@ const Home = () => {
|
|||||||
<GitHubIcon className="githubIcon" />
|
<GitHubIcon className="githubIcon" />
|
||||||
</div>
|
</div>
|
||||||
<Location />
|
<Location />
|
||||||
|
<TallContent
|
||||||
|
initialAnimation="animate__flipInY"
|
||||||
|
onMouseEnter={handleMouseEnter}
|
||||||
|
onAnimationEnd={handleAnimationEnd}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import "../css/Location.css";
|
import "../css/Location.css";
|
||||||
|
|
||||||
const Location = () => {
|
const Location = () => {
|
||||||
return <div className="location container">Location</div>;
|
return <div className="location container">located @Cologne, Germany</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Location;
|
export default Location;
|
||||||
|
|||||||
18
src/components/TallContent.jsx
Normal file
18
src/components/TallContent.jsx
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import React, { useState } from "react";
|
||||||
|
import "../css/TallContent.css";
|
||||||
|
|
||||||
|
const TallContent = ({ initialAnimation, onMouseEnter, onAnimationEnd }) => {
|
||||||
|
const [animation, setAnimation] = useState(initialAnimation);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`container tallContent animate__animated ${animation}`}
|
||||||
|
onMouseEnter={() => onMouseEnter(setAnimation)}
|
||||||
|
onAnimationEnd={() => onAnimationEnd(setAnimation)}
|
||||||
|
>
|
||||||
|
TallContent
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TallContent;
|
||||||
@@ -12,11 +12,12 @@
|
|||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
border: 0.5px solid rgb(73, 73, 73);
|
border: 0.5px solid rgb(73, 73, 73);
|
||||||
|
box-shadow: 0 0 10px -5px rgba(184, 184, 184, .2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container:hover {
|
.container:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
animation-duration: .5s;
|
animation-duration: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
|||||||
3
src/css/TallContent.css
Normal file
3
src/css/TallContent.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.tallContent {
|
||||||
|
grid-area: 1 / 5 / 8 / 9;
|
||||||
|
}
|
||||||
@@ -6,5 +6,12 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "SF Pro Display", sans-serif;
|
font-family: "SF Pro Display", sans-serif;
|
||||||
background-color: black;
|
background-color: #000000;
|
||||||
|
background-color: #000000;
|
||||||
|
background-image: linear-gradient(
|
||||||
|
43deg,
|
||||||
|
#000000 29%,
|
||||||
|
#454545 89%,
|
||||||
|
#2d2d2d 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user