diff --git a/public/assets/coin.png b/public/assets/coin.png new file mode 100644 index 0000000..6ba7077 Binary files /dev/null and b/public/assets/coin.png differ diff --git a/public/assets/eventDetails.png b/public/assets/eventDetails.png new file mode 100644 index 0000000..6387866 Binary files /dev/null and b/public/assets/eventDetails.png differ diff --git a/src/app/page.tsx b/src/app/page.tsx index 48c2beb..db10acc 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,9 +1,11 @@ +import EventDetails from "@/components/landing/eventDetails"; import HeroSection from "@/components/landing/hero"; export default function Home() { return (
+
); } diff --git a/src/components/landing/eventDetails.tsx b/src/components/landing/eventDetails.tsx new file mode 100644 index 0000000..e7ad151 --- /dev/null +++ b/src/components/landing/eventDetails.tsx @@ -0,0 +1,75 @@ +'use client'; +import Image from 'next/image'; +import { useEffect, useState } from 'react'; +import CoinsRow from '../ui/coins-line'; +import EventDetailsMarquee from '../ui/marquee'; + +export default function EventDetails() { + const [isSmallScreen, setIsSmallScreen] = useState(false); + + useEffect(() => { + const handleResize = () => { + setIsSmallScreen(window.innerWidth < 1200); + }; + + handleResize(); + + window.addEventListener('resize', handleResize); + + return () => { + window.removeEventListener('resize', handleResize); + }; + }, []); + + const coinCenterCount = isSmallScreen ? 3 : 5; + const coinSideCount = isSmallScreen ? 3 : 6; + + // Set image dimensions based on screen size + const imageWidth = isSmallScreen ? 200 : 350; + const imageHeight = isSmallScreen ? 250 : 400; + + return ( +
+ +
+
+ eventDetails +
+
+

+ WHAT IS + Techie Sleuths? +

+

+ Lorem ipsum dolor sit amet, consectetur{' '} + adipiscing +
+ elit. Nunc vulputate libero et velit interdum, ac +
+ aliquet odio mattis. Class aptent taciti sociosqu +
+ ad litora torquent per conubia nostr! +

+

+ View past events{' '} + {'>'} +

+
+
+
+ +
+
+ ); +} diff --git a/src/components/ui/coins-line.tsx b/src/components/ui/coins-line.tsx new file mode 100644 index 0000000..d5be5ae --- /dev/null +++ b/src/components/ui/coins-line.tsx @@ -0,0 +1,45 @@ +'use client' +import React from 'react'; + +interface CoinsRowProps { + centerCount: number; + sideCount: number; +} + +const CoinsRow: React.FC = ({ centerCount, sideCount }) => { + const totalImages = centerCount + 2 * sideCount; + + const images = Array(totalImages).fill({ src: "/assets/coin.png", alt: "Coin" }); + + const centerStartIndex = sideCount; + const centerEndIndex = centerStartIndex + centerCount; + + return ( +
+ {images.map((image, index) => { + let opacity = 0; + + if (index >= centerStartIndex && index < centerEndIndex) { + opacity = 1; + } else if (index < centerStartIndex) { + const distanceFromCenter = centerStartIndex - index; + opacity = 1 - distanceFromCenter * (1 / sideCount); + } else { + const distanceFromCenter = index - centerEndIndex; + opacity = 1 - distanceFromCenter * (1 / sideCount); + } + + return ( + {image.alt} + ); + })} +
+ ); +}; + +export default CoinsRow; diff --git a/src/components/ui/marquee.tsx b/src/components/ui/marquee.tsx new file mode 100644 index 0000000..0318886 --- /dev/null +++ b/src/components/ui/marquee.tsx @@ -0,0 +1,27 @@ +'use client' +import Image from "next/image"; +import Marquee from "react-fast-marquee"; + +export default function EventDetailsMarquee() { + const count = 2; + return ( + + {Array.from({ length: count }).map((_, index) => ( +
+

+ COMING SOON +

+
+ mush +
+
+ ))} +
+ ); +}