added some styling for bg + added tallContent component + animation

This commit is contained in:
yousifpa98
2024-12-20 03:04:56 +01:00
parent b7391efff9
commit ecd7a6af01
6 changed files with 38 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import GitHubIcon from "../assets/icons/socials/square-github.svg?react";
import Location from "./Location";
import "animate.css";
import { useState } from "react";
import TallContent from "./TallContent";
const Home = () => {
const [hoverAnimation, setHoverAnimation] = useState("animate__headShake");
@@ -49,6 +50,11 @@ const Home = () => {
<GitHubIcon className="githubIcon" />
</div>
<Location />
<TallContent
initialAnimation="animate__flipInY"
onMouseEnter={handleMouseEnter}
onAnimationEnd={handleAnimationEnd}
/>
</div>
);
};

View File

@@ -2,7 +2,7 @@ import React from "react";
import "../css/Location.css";
const Location = () => {
return <div className="location container">Location</div>;
return <div className="location container">located @Cologne, Germany</div>;
};
export default Location;

View 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;