diff --git a/components/home-hero.tsx b/components/home-hero.tsx new file mode 100644 index 0000000..b75f83b --- /dev/null +++ b/components/home-hero.tsx @@ -0,0 +1,78 @@ +"use client"; + +import Image from "next/image"; +import { useRef, useState } from "react"; +import { Card, Typography } from "poyraz-ui/atoms"; +import { NewsCard } from "poyraz-ui/molecules"; +import { HOME_NEWS } from "@/lib/home-news"; + +export function HomeHero() { + const [frame, setFrame] = useState<1 | 2>(1); + const intervalRef = useRef | null>(null); + + const handleMouseEnter = () => { + if (intervalRef.current) return; + + intervalRef.current = setInterval(() => { + setFrame((prev) => (prev === 1 ? 2 : 1)); + }, 260); + }; + + const handleMouseLeave = () => { + if (intervalRef.current) { + clearInterval(intervalRef.current); + intervalRef.current = null; + } + setFrame(1); + }; + + return ( +
+
+ {HOME_NEWS.map((item) => ( + + ))} +
+ + +
+
+ + Poyraz + + + Avsever + +
+ + A young person exploring technology. + +
+ +
+
+ Poyraz Avsever +
+
+
+
+ ); +} diff --git a/public/images/hero1.png b/public/images/hero1.png new file mode 100644 index 0000000..408d64c Binary files /dev/null and b/public/images/hero1.png differ diff --git a/public/images/hero2.png b/public/images/hero2.png new file mode 100644 index 0000000..f2d765e Binary files /dev/null and b/public/images/hero2.png differ diff --git a/public/news/design.svg b/public/news/design.svg new file mode 100644 index 0000000..39959ef --- /dev/null +++ b/public/news/design.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/news/performance.svg b/public/news/performance.svg new file mode 100644 index 0000000..10e07bf --- /dev/null +++ b/public/news/performance.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +