Skip to content

Commit 7f29dc2

Browse files
Merge pull request #9 from 0xPlaygrounds/fix/align-wave-animation-to-product-image
fix: align-wave-animation-to-product-image
2 parents 04fa804 + e84ecf5 commit 7f29dc2

File tree

4 files changed

+87
-17
lines changed

4 files changed

+87
-17
lines changed

src/app/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { CreateCombine } from '@/components/createCombine';
22
import { DoThingsDifferently } from '@/components/doThingsDifferently';
33
import { Footer } from '@/components/footer';
4-
import { Header } from '@/components/header';
54
import { MeetTeam } from '@/components/meetTeam';
65
import { Navbar } from '@/components/navbar';
76
import { ProductAnimation } from '@/components/productAnimation';
@@ -11,7 +10,6 @@ export default function Home() {
1110
return (
1211
<div className="flex flex-col">
1312
<Navbar />
14-
<Header />
1513
<ProductAnimation />
1614
<CreateCombine />
1715
<ThreePlatforms />

src/components/analytics/PostHogProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export function PostHogClientProvider({ children }: Props) {
2121

2222
posthog.init(key, {
2323
api_host: '/panopticon',
24+
ui_host: 'https://us.i.posthog.com',
2425
capture_pageview: true,
2526
autocapture: true,
2627
});

src/components/meetTeam.tsx

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import Image from 'next/image';
4+
import { useState } from 'react';
45

56
type TeamMember = {
67
name: string;
@@ -14,10 +15,14 @@ const team: TeamMember[] = [
1415
{ name: 'Stopher', title: 'CTO', image: '/assets/team/stopher.webp' },
1516
{
1617
name: 'Marie',
17-
title: 'Lead Developer',
18+
title: 'Lead Engineer',
1819
image: '/assets/team/garance.webp',
1920
},
20-
{ name: 'Mateo', title: 'Product Manager', image: '/assets/team/mateo.webp' },
21+
{
22+
name: 'Mateo',
23+
title: 'Product Manager & Engineer',
24+
image: '/assets/team/mateo.webp',
25+
},
2126
{
2227
name: 'Mochan',
2328
title: 'Founding Engineer',
@@ -55,15 +60,39 @@ const team: TeamMember[] = [
5560
},
5661
];
5762

58-
const TeamMemberCard = ({ name, title, image }: TeamMember) => {
63+
type TeamMemberCardProps = TeamMember & {
64+
isActive: boolean;
65+
onActivate: () => void;
66+
};
67+
68+
const TeamMemberCard = ({
69+
name,
70+
title,
71+
image,
72+
isActive,
73+
onActivate,
74+
}: TeamMemberCardProps) => {
5975
return (
60-
<div className="relative w-[240px] h-[288px] overflow-hidden rounded-lg group flex-shrink-0">
76+
<div
77+
className="relative w-[240px] h-[288px] overflow-hidden rounded-lg group flex-shrink-0 cursor-pointer"
78+
onClick={onActivate}
79+
role="button"
80+
tabIndex={0}
81+
onKeyDown={(event) => {
82+
if (event.key === 'Enter' || event.key === ' ') {
83+
event.preventDefault();
84+
onActivate();
85+
}
86+
}}
87+
>
6188
<Image
6289
src={image || '/placeholder.svg'}
6390
alt={name}
6491
width={240}
6592
height={288}
66-
className="w-full h-full object-cover filter grayscale transition duration-500 group-hover:grayscale-0"
93+
className={`w-full h-full object-cover filter transition duration-500 ${
94+
isActive ? 'grayscale-0' : 'grayscale'
95+
} group-hover:grayscale-0`}
6796
draggable={false}
6897
onDragStart={(e) => e.preventDefault()}
6998
/>
@@ -76,6 +105,12 @@ const TeamMemberCard = ({ name, title, image }: TeamMember) => {
76105
};
77106

78107
export const MeetTeam = () => {
108+
const [activeIndex, setActiveIndex] = useState<number | null>(null);
109+
110+
const handleMemberToggle = (index: number) => {
111+
setActiveIndex((prev) => (prev === index ? null : index));
112+
};
113+
79114
return (
80115
<div className="flex flex-col gap-y-[80px] pt-32 bg-gradient-to-b from-[#0A0A0A] from-65% to-[#16161A]">
81116
<div className="flex text-[28px] md:text-[52px] text-center flex-col px-4 md:px-[112px]">
@@ -95,6 +130,8 @@ export const MeetTeam = () => {
95130
title={member.title}
96131
image={member.image}
97132
name={member.name}
133+
isActive={activeIndex === i}
134+
onActivate={() => handleMemberToggle(i)}
98135
/>
99136
))}
100137
</div>

src/components/productAnimation.tsx

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,59 @@ import Image from 'next/image';
22

33
export const ProductAnimation = () => {
44
return (
5-
<div className="flex flex-col p-4 pt-6 md:pt-[64px] items-center justify-center h-full relative">
5+
<div className="relative">
6+
{/* Video background - extends beyond content to show the wave */}
67
<video
78
src="/assets/videoanimation.mp4"
89
autoPlay
910
loop
1011
muted
1112
playsInline
12-
className="absolute top-[-10rem] md:top-[-45%] w-full h-full md:h-screen object-cover object-top z-0"
13+
className="absolute inset-x-0 top-0 w-full object-contain z-0"
14+
style={{
15+
height: 'calc(130% + 5vw)',
16+
objectPosition: 'center 65%',
17+
}}
1318
/>
19+
20+
{/* Top gradient fade */}
1421
<div className="pointer-events-none absolute top-0 left-0 w-full h-8 bg-gradient-to-b from-[#010101] to-transparent z-10" />
15-
<Image
16-
src="/assets/header-product.webp"
17-
alt="Product header"
18-
width={800}
19-
height={400}
20-
sizes="(min-width: 768px) 800px, 100vw"
21-
className="object-contain w-full md:w-auto max-w-[800px] relative z-10"
22+
23+
{/* Content container */}
24+
<div className="relative z-10 flex flex-col items-center pt-[96px] px-4 md:px-0">
25+
{/* Header text */}
26+
<div className="flex w-full items-center justify-center gap-y-6 flex-col">
27+
<div
28+
className="flex text-center leading-none flex-col"
29+
style={{ fontSize: 'clamp(2.5rem, 12vw, 5.625rem)' }}
30+
>
31+
<span>
32+
Open and <span className="font-ivypresto italic">fearless</span>.
33+
</span>
34+
<span>This is AI&apos;s future.</span>
35+
</div>
36+
<span className="text-[18px] text-[#D4D4D4]">
37+
Redefining how AI is built. Open to all, and fast as ever.
38+
</span>
39+
</div>
40+
41+
{/* Product image */}
42+
<div className="pt-6 md:pt-[64px] pb-8 md:pb-16">
43+
<Image
44+
src="/assets/header-product.webp"
45+
alt="Product header"
46+
width={800}
47+
height={400}
48+
className="object-contain w-full md:w-auto"
49+
/>
50+
</div>
51+
</div>
52+
53+
{/* Bottom gradient fade - aligned with video bottom */}
54+
<div
55+
className="pointer-events-none absolute inset-x-0 w-full h-32 bg-gradient-to-t from-[#010101] to-transparent z-10"
56+
style={{ top: 'calc(130% + 5vw - 8rem)' }}
2257
/>
23-
<div className="pointer-events-none absolute inset-x-0 bottom-0 md:bottom-auto md:top-[calc(100vh-128px)] w-full h-32 bg-gradient-to-t from-[#010101] to-transparent z-10" />
2458
</div>
2559
);
2660
};

0 commit comments

Comments
 (0)