-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9101aa9
commit 86e1e4c
Showing
3 changed files
with
275 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import DeployButton from "../components/LogoButton"; | ||
import AuthButton from "../components/AuthButton"; | ||
import MainFooter from "@/components/main-footer"; | ||
import { WriteIcon } from '@/components/WriteIcon'; | ||
import Search from '@/components/Search/Search' | ||
import { ModeToggle } from "@/components/toggle-theme"; | ||
import { HeroParallax } from "@/components/ui/heroparallax"; | ||
|
||
|
||
export default function LandingPage(){ | ||
return <HeroParallax products={products} /> | ||
} | ||
|
||
export const products = [ | ||
{ | ||
title: "Moonbeam", | ||
link: "https://gomoonbeam.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/moonbeam.png", | ||
}, | ||
{ | ||
title: "Cursor", | ||
link: "https://cursor.so", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/cursor.png", | ||
}, | ||
{ | ||
title: "Rogue", | ||
link: "https://userogue.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/rogue.png", | ||
}, | ||
|
||
{ | ||
title: "Editorially", | ||
link: "https://editorially.org", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/editorially.png", | ||
}, | ||
{ | ||
title: "Editrix AI", | ||
link: "https://editrix.ai", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/editrix.png", | ||
}, | ||
{ | ||
title: "Pixel Perfect", | ||
link: "https://app.pixelperfect.quest", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/pixelperfect.png", | ||
}, | ||
|
||
{ | ||
title: "Algochurn", | ||
link: "https://algochurn.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/algochurn.png", | ||
}, | ||
{ | ||
title: "Aceternity UI", | ||
link: "https://ui.aceternity.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/aceternityui.png", | ||
}, | ||
{ | ||
title: "Tailwind Master Kit", | ||
link: "https://tailwindmasterkit.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/tailwindmasterkit.png", | ||
}, | ||
{ | ||
title: "SmartBridge", | ||
link: "https://smartbridgetech.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/smartbridge.png", | ||
}, | ||
{ | ||
title: "Renderwork Studio", | ||
link: "https://renderwork.studio", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/renderwork.png", | ||
}, | ||
|
||
{ | ||
title: "Creme Digital", | ||
link: "https://cremedigital.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/cremedigital.png", | ||
}, | ||
{ | ||
title: "Golden Bells Academy", | ||
link: "https://goldenbellsacademy.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/goldenbellsacademy.png", | ||
}, | ||
{ | ||
title: "Invoker Labs", | ||
link: "https://invoker.lol", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/invoker.png", | ||
}, | ||
{ | ||
title: "E Free Invoice", | ||
link: "https://efreeinvoice.com", | ||
thumbnail: | ||
"https://aceternity.com/images/products/thumbnails/new/efreeinvoice.png", | ||
}, | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
"use client"; | ||
import React from "react"; | ||
import { | ||
motion, | ||
useScroll, | ||
useTransform, | ||
useSpring, | ||
MotionValue, | ||
} from "framer-motion"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
export const HeroParallax = ({ | ||
products, | ||
}: { | ||
products: { | ||
title: string; | ||
link: string; | ||
thumbnail: string; | ||
}[]; | ||
}) => { | ||
const firstRow = products.slice(0, 5); | ||
const secondRow = products.slice(5, 10); | ||
const thirdRow = products.slice(10, 15); | ||
const ref = React.useRef(null); | ||
const { scrollYProgress } = useScroll({ | ||
target: ref, | ||
offset: ["start start", "end start"], | ||
}); | ||
|
||
const springConfig = { stiffness: 300, damping: 30, bounce: 100 }; | ||
|
||
const translateX = useSpring( | ||
useTransform(scrollYProgress, [0, 1], [0, 1000]), | ||
springConfig | ||
); | ||
const translateXReverse = useSpring( | ||
useTransform(scrollYProgress, [0, 1], [0, -1000]), | ||
springConfig | ||
); | ||
const rotateX = useSpring( | ||
useTransform(scrollYProgress, [0, 0.2], [15, 0]), | ||
springConfig | ||
); | ||
const opacity = useSpring( | ||
useTransform(scrollYProgress, [0, 0.2], [0.2, 1]), | ||
springConfig | ||
); | ||
const rotateZ = useSpring( | ||
useTransform(scrollYProgress, [0, 0.2], [20, 0]), | ||
springConfig | ||
); | ||
const translateY = useSpring( | ||
useTransform(scrollYProgress, [0, 0.2], [-700, 500]), | ||
springConfig | ||
); | ||
return ( | ||
<div | ||
ref={ref} | ||
className="h-[300vh] py-40 overflow-hidden antialiased relative flex flex-col self-auto [perspective:1000px] [transform-style:preserve-3d]" | ||
> | ||
<Header /> | ||
<motion.div | ||
style={{ | ||
rotateX, | ||
rotateZ, | ||
translateY, | ||
opacity, | ||
}} | ||
className="" | ||
> | ||
<motion.div className="flex flex-row-reverse space-x-reverse space-x-20 mb-20"> | ||
{firstRow.map((product) => ( | ||
<ProductCard | ||
product={product} | ||
translate={translateX} | ||
key={product.title} | ||
/> | ||
))} | ||
</motion.div> | ||
<motion.div className="flex flex-row mb-20 space-x-20 "> | ||
{secondRow.map((product) => ( | ||
<ProductCard | ||
product={product} | ||
translate={translateXReverse} | ||
key={product.title} | ||
/> | ||
))} | ||
</motion.div> | ||
<motion.div className="flex flex-row-reverse space-x-reverse space-x-20"> | ||
{thirdRow.map((product) => ( | ||
<ProductCard | ||
product={product} | ||
translate={translateX} | ||
key={product.title} | ||
/> | ||
))} | ||
</motion.div> | ||
</motion.div> | ||
</div> | ||
); | ||
}; | ||
|
||
export const Header = () => { | ||
return ( | ||
<div className="max-w-7xl relative mx-auto py-20 md:py-40 px-4 w-full left-0 top-0"> | ||
<h1 className="text-2xl md:text-7xl font-bold dark:text-white"> | ||
The Ultimate <br /> development studio | ||
</h1> | ||
<p className="max-w-2xl text-base md:text-xl mt-8 dark:text-neutral-200"> | ||
We build beautiful products with the latest technologies and frameworks. | ||
We are a team of passionate developers and designers that love to build | ||
amazing products. | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export const ProductCard = ({ | ||
product, | ||
translate, | ||
}: { | ||
product: { | ||
title: string; | ||
link: string; | ||
thumbnail: string; | ||
}; | ||
translate: MotionValue<number>; | ||
}) => { | ||
return ( | ||
<motion.div | ||
style={{ | ||
x: translate, | ||
}} | ||
whileHover={{ | ||
y: -20, | ||
}} | ||
key={product.title} | ||
className="group/product h-96 w-[30rem] relative flex-shrink-0" | ||
> | ||
<Link | ||
href={product.link} | ||
className="block group-hover/product:shadow-2xl " | ||
> | ||
<Image | ||
src={product.thumbnail} | ||
height="600" | ||
width="600" | ||
className="object-cover object-left-top absolute h-full w-full inset-0" | ||
alt={product.title} | ||
/> | ||
</Link> | ||
<div className="absolute inset-0 h-full w-full opacity-0 group-hover/product:opacity-80 bg-black pointer-events-none"></div> | ||
<h2 className="absolute bottom-4 left-4 opacity-0 group-hover/product:opacity-100 text-white"> | ||
{product.title} | ||
</h2> | ||
</motion.div> | ||
); | ||
}; |