Skip to content

Commit a4e1737

Browse files
feat: clean up landing page further
1 parent 9d92e3d commit a4e1737

File tree

7 files changed

+87
-203
lines changed

7 files changed

+87
-203
lines changed

src/components/Home/AboutMaia.tsx

+1-100
Original file line numberDiff line numberDiff line change
@@ -99,72 +99,11 @@ export const AboutMaia = () => {
9999

100100
return (
101101
<div className="font-helvetica [&_a]:text-human-3">
102-
<motion.div
103-
className="sticky top-0 z-20 flex flex-row items-center justify-center gap-10 bg-background-2 py-5 text-sm uppercase tracking-wider backdrop-blur-md"
104-
initial={{ opacity: 0, y: -10 }}
105-
animate={{ opacity: 1, y: 0 }}
106-
transition={{ duration: 0.3 }}
107-
>
108-
<motion.a
109-
href="#main_info"
110-
className="relative !text-primary"
111-
whileHover={{ scale: 1.05 }}
112-
whileTap={{ scale: 0.95 }}
113-
>
114-
Project
115-
<motion.div
116-
className="absolute -bottom-1 left-0 h-0.5 w-0 bg-human-3"
117-
whileHover={{ width: '100%' }}
118-
transition={{ duration: 0.2 }}
119-
/>
120-
</motion.a>
121-
<motion.a
122-
href="#team_info"
123-
className="relative !text-primary"
124-
whileHover={{ scale: 1.05 }}
125-
whileTap={{ scale: 0.95 }}
126-
>
127-
Team
128-
<motion.div
129-
className="absolute -bottom-1 left-0 h-0.5 w-0 bg-human-3"
130-
whileHover={{ width: '100%' }}
131-
transition={{ duration: 0.2 }}
132-
/>
133-
</motion.a>
134-
</motion.div>
135-
136102
<section
137103
id="main_info"
138-
className="relative flex items-center justify-center overflow-hidden bg-background-1 py-20 text-center"
104+
className="relative flex items-center justify-center bg-background-1 py-20 text-center"
139105
ref={projectRef}
140106
>
141-
{/* Background decorative elements */}
142-
<motion.div
143-
className="absolute -top-40 right-0 h-80 w-80 rounded-full bg-human-4/5"
144-
animate={{
145-
y: projectInView ? [0, 30, 0] : 0,
146-
scale: projectInView ? [1, 1.05, 1] : 1,
147-
}}
148-
transition={{
149-
repeat: Infinity,
150-
duration: 6,
151-
times: [0, 0.5, 1],
152-
}}
153-
/>
154-
<motion.div
155-
className="absolute -left-20 bottom-0 h-60 w-60 rounded-full bg-engine-4/5"
156-
animate={{
157-
y: projectInView ? [0, -20, 0] : 0,
158-
scale: projectInView ? [1, 1.03, 1] : 1,
159-
}}
160-
transition={{
161-
repeat: Infinity,
162-
duration: 5,
163-
times: [0, 0.5, 1],
164-
delay: 0.5,
165-
}}
166-
/>
167-
168107
<div className="z-10 mx-auto my-0 max-w-[1170px]">
169108
<div className="m-auto box-border w-auto px-4 md:w-2/3">
170109
<motion.h3
@@ -273,31 +212,6 @@ export const AboutMaia = () => {
273212
className="relative overflow-hidden bg-background-2 py-20"
274213
ref={teamRef}
275214
>
276-
{/* Background decorative elements */}
277-
<motion.div
278-
className="absolute right-20 top-20 h-40 w-40 rounded-full bg-human-4/5"
279-
animate={{
280-
y: teamInView ? [0, 20, 0] : 0,
281-
}}
282-
transition={{
283-
repeat: Infinity,
284-
duration: 4,
285-
times: [0, 0.5, 1],
286-
}}
287-
/>
288-
<motion.div
289-
className="absolute bottom-20 left-20 h-60 w-60 rounded-full bg-engine-4/5"
290-
animate={{
291-
y: teamInView ? [0, -20, 0] : 0,
292-
}}
293-
transition={{
294-
repeat: Infinity,
295-
duration: 5,
296-
times: [0, 0.5, 1],
297-
delay: 0.5,
298-
}}
299-
/>
300-
301215
<div className="relative z-10 mx-auto my-0 max-w-[1170px]">
302216
<div className="m-auto box-border w-auto px-4 md:w-2/3">
303217
<motion.h3
@@ -334,19 +248,6 @@ export const AboutMaia = () => {
334248
className="relative flex flex-col justify-evenly overflow-hidden bg-background-1 py-20"
335249
ref={acknowledgementsRef}
336250
>
337-
{/* Background decorative elements */}
338-
<motion.div
339-
className="absolute -top-10 right-10 h-40 w-40 rounded-full bg-human-4/5"
340-
animate={{
341-
scale: acknowledgementsInView ? [1, 1.1, 1] : 1,
342-
}}
343-
transition={{
344-
repeat: Infinity,
345-
duration: 6,
346-
times: [0, 0.5, 1],
347-
}}
348-
/>
349-
350251
<div className="z-10 mx-auto my-0 max-w-[1170px]">
351252
<div className="m-auto box-border w-auto px-4 md:w-2/3">
352253
<motion.h3

src/components/Home/HomeHero.tsx

-26
Original file line numberDiff line numberDiff line change
@@ -129,32 +129,6 @@ export const HomeHero: React.FC<Props> = ({ scrollHandler }: Props) => {
129129

130130
return (
131131
<div className="relative flex flex-col items-center justify-center overflow-hidden pb-16 pt-24 md:pb-28 md:pt-36">
132-
{/* Decorative elements */}
133-
<motion.div
134-
className="absolute -top-20 right-10 h-40 w-40 rounded-full bg-human-4/5"
135-
animate={{
136-
y: [0, 20, 0],
137-
}}
138-
transition={{
139-
repeat: Infinity,
140-
duration: 4,
141-
times: [0, 0.5, 1],
142-
}}
143-
/>
144-
<motion.div
145-
className="absolute bottom-10 left-10 h-60 w-60 rounded-full bg-engine-4/5"
146-
animate={{
147-
y: [0, -20, 0],
148-
}}
149-
transition={{
150-
repeat: Infinity,
151-
duration: 5,
152-
times: [0, 0.5, 1],
153-
delay: 0.5,
154-
}}
155-
/>
156-
157-
{/* <BetaBlurb /> */}
158132
<div className="z-10 flex w-full max-w-[1200px] flex-col items-center justify-center gap-16 p-4 text-left md:flex-row md:gap-20">
159133
<div className="flex w-full flex-col items-start justify-center gap-8 md:w-[40%]">
160134
<div className="flex flex-col gap-4">
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { motion } from 'framer-motion'
2+
3+
export const PageNavigation = () => {
4+
return (
5+
<motion.div
6+
className="sticky top-0 z-20 flex flex-row items-center justify-center gap-6 border-y border-background-3/20 bg-background-2 py-4 text-sm uppercase tracking-wider backdrop-blur-md"
7+
initial={{ opacity: 0, y: -10 }}
8+
animate={{ opacity: 1, y: 0 }}
9+
transition={{ duration: 0.3 }}
10+
>
11+
<NavLink href="#play-section" label="Play" />
12+
<NavLink href="#analysis-section" label="Analysis" />
13+
<NavLink href="#train-section" label="Train" />
14+
<NavLink href="#more-features" label="Features" />
15+
<NavLink href="#main_info" label="Project" />
16+
<NavLink href="#team_info" label="Team" />
17+
</motion.div>
18+
)
19+
}
20+
21+
const NavLink = ({ href, label }: { href: string; label: string }) => {
22+
return (
23+
<motion.a
24+
href={href}
25+
className="relative px-2 !text-primary"
26+
whileHover={{ scale: 1.05 }}
27+
whileTap={{ scale: 0.95 }}
28+
>
29+
{label}
30+
<motion.div
31+
className="absolute -bottom-1 left-0 h-0.5 w-0 bg-human-3"
32+
whileHover={{ width: '100%' }}
33+
transition={{ duration: 0.2 }}
34+
/>
35+
</motion.a>
36+
)
37+
}

src/components/Home/Sections/AdditionalFeaturesSection.tsx

+33-45
Original file line numberDiff line numberDiff line change
@@ -30,146 +30,134 @@ export const AdditionalFeaturesSection = ({
3030
visible: {
3131
opacity: 1,
3232
transition: {
33-
staggerChildren: 0.2,
33+
staggerChildren: 0.1,
3434
},
3535
},
3636
}
3737

3838
const itemVariants = {
39-
hidden: { y: 50, opacity: 0 },
39+
hidden: { y: 30, opacity: 0 },
4040
visible: {
4141
y: 0,
4242
opacity: 1,
43-
transition: { duration: 0.6, ease: 'easeOut' },
43+
transition: { duration: 0.3, ease: 'easeOut' },
4444
},
4545
}
4646

4747
return (
4848
<section
4949
id={id}
50-
className="relative flex min-h-screen w-full flex-col items-center justify-center overflow-hidden bg-background-1 py-16"
50+
className="relative w-full flex-col items-center overflow-hidden bg-background-1 py-16"
5151
ref={ref}
5252
>
5353
<div className="container mx-auto px-4">
54-
<div className="mb-16 text-center">
54+
<div className="mb-14 max-w-3xl text-left">
5555
<motion.div
56-
initial={{ opacity: 0, y: -20 }}
57-
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -20 }}
58-
transition={{ duration: 0.6 }}
59-
className="mb-4 inline-block rounded-full bg-human-3/10 px-4 py-1 text-sm font-medium text-human-3"
56+
initial={{ opacity: 0, y: -10 }}
57+
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -10 }}
58+
transition={{ duration: 0.3 }}
59+
className="mb-2 inline-block rounded-full bg-human-3/10 px-4 py-1 text-sm font-medium text-human-3"
6060
>
6161
More Features
6262
</motion.div>
6363
<motion.h2
64-
className="mb-6 text-3xl font-bold md:text-4xl lg:text-5xl"
65-
initial={{ opacity: 0, y: -20 }}
66-
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -20 }}
67-
transition={{ duration: 0.6, delay: 0.1 }}
64+
className="mb-4 text-3xl font-bold md:text-4xl lg:text-5xl"
65+
initial={{ opacity: 0, y: -10 }}
66+
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -10 }}
67+
transition={{ duration: 0.3, delay: 0.1 }}
6868
>
6969
Explore other ways to use Maia
7070
</motion.h2>
7171
<motion.p
72-
className="mx-auto max-w-2xl text-lg text-primary/80"
73-
initial={{ opacity: 0, y: -20 }}
74-
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -20 }}
75-
transition={{ duration: 0.6, delay: 0.2 }}
72+
className="max-w-2xl text-lg text-primary/80"
73+
initial={{ opacity: 0, y: -10 }}
74+
animate={inView ? { opacity: 1, y: 0 } : { opacity: 0, y: -10 }}
75+
transition={{ duration: 0.3, delay: 0.2 }}
7676
>
7777
Maia offers a range of innovative tools to help you understand human
7878
chess and improve your skills
7979
</motion.p>
8080
</div>
8181

8282
<motion.div
83-
className="grid gap-8 md:grid-cols-3"
83+
className="grid gap-6 md:grid-cols-3"
8484
variants={containerVariants}
8585
initial="hidden"
8686
animate={inView ? 'visible' : 'hidden'}
8787
>
8888
{/* Openings Feature */}
8989
<motion.div
90-
className="flex flex-col rounded-lg bg-background-2 p-6 shadow-lg transition-transform duration-300 hover:scale-105"
90+
className="hover:scale-102 flex flex-col rounded-lg bg-background-2 p-5 shadow-lg transition-transform duration-200"
9191
variants={itemVariants}
9292
>
93-
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-human-3/10 p-3">
94-
<div className="h-6 w-6 text-human-3">
93+
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-human-3/10 p-2">
94+
<div className="h-7 w-7 text-human-3">
9595
<StarIcon />
9696
</div>
9797
</div>
9898
<h3 className="mb-3 text-xl font-bold">Openings Practice</h3>
99-
<p className="mb-6 flex-grow text-primary/80">
99+
<p className="mb-5 flex-grow text-primary/80">
100100
Drill chess openings against Maia models calibrated to specific
101101
rating levels, allowing you to practice against opponents similar
102102
to those you&apos;ll face.
103103
</p>
104104
<Link
105105
href="/openings"
106-
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-4 py-2 font-medium transition duration-200 hover:bg-background-4"
106+
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-5 py-3 font-medium transition duration-200 hover:bg-background-4"
107107
>
108108
Practice Openings
109109
</Link>
110110
</motion.div>
111111

112112
{/* Hand & Brain Feature */}
113113
<motion.div
114-
className="flex flex-col rounded-lg bg-background-2 p-6 shadow-lg transition-transform duration-300 hover:scale-105"
114+
className="hover:scale-102 flex flex-col rounded-lg bg-background-2 p-5 shadow-lg transition-transform duration-200"
115115
variants={itemVariants}
116116
>
117-
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-engine-3/10 p-3">
118-
<div className="h-6 w-6 text-engine-3">
117+
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-engine-3/10 p-2">
118+
<div className="h-7 w-7 text-engine-3">
119119
<TuringIcon />
120120
</div>
121121
</div>
122122
<h3 className="mb-3 text-xl font-bold">Hand & Brain</h3>
123-
<p className="mb-6 flex-grow text-primary/80">
123+
<p className="mb-5 flex-grow text-primary/80">
124124
Team up with Maia in this collaborative chess variant. You can be
125125
the &quot;Hand&quot; making moves while Maia is the
126126
&quot;Brain&quot; selecting pieces, or vice versa.
127127
</p>
128128
<button
129129
onClick={startHandBrainGame}
130-
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-4 py-2 font-medium transition duration-200 hover:bg-background-4"
130+
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-5 py-3 font-medium transition duration-200 hover:bg-background-4"
131131
>
132132
Play Hand & Brain
133133
</button>
134134
</motion.div>
135135

136136
{/* Bot or Not Feature */}
137137
<motion.div
138-
className="flex flex-col rounded-lg bg-background-2 p-6 shadow-lg transition-transform duration-300 hover:scale-105"
138+
className="hover:scale-102 flex flex-col rounded-lg bg-background-2 p-5 shadow-lg transition-transform duration-200"
139139
variants={itemVariants}
140140
>
141-
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-human-4/10 p-3">
142-
<div className="h-6 w-6 text-human-4">
141+
<div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-human-4/10 p-2">
142+
<div className="h-7 w-7 text-human-4">
143143
<TuringIcon />
144144
</div>
145145
</div>
146146
<h3 className="mb-3 text-xl font-bold">Bot or Not</h3>
147-
<p className="mb-6 flex-grow text-primary/80">
147+
<p className="mb-5 flex-grow text-primary/80">
148148
Test your ability to distinguish between human and AI chess play.
149149
This Turing test for chess helps you understand the differences
150150
between human and engine moves.
151151
</p>
152152
<Link
153153
href="/turing"
154-
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-4 py-2 font-medium transition duration-200 hover:bg-background-4"
154+
className="mt-auto inline-flex items-center justify-center rounded-md bg-background-3 px-5 py-3 font-medium transition duration-200 hover:bg-background-4"
155155
>
156156
Try Bot or Not
157157
</Link>
158158
</motion.div>
159159
</motion.div>
160160
</div>
161-
162-
{/* Decorative elements */}
163-
<motion.div
164-
className="absolute -bottom-20 left-10 h-40 w-40 rounded-full bg-background-3/20"
165-
animate={{ opacity: inView ? [0.2, 0.5, 0.2] : 0.2 }}
166-
transition={{ repeat: Infinity, duration: 5 }}
167-
/>
168-
<motion.div
169-
className="absolute right-10 top-10 h-60 w-60 rounded-full bg-background-3/10"
170-
animate={{ opacity: inView ? [0.1, 0.3, 0.1] : 0.1 }}
171-
transition={{ repeat: Infinity, duration: 6, delay: 1 }}
172-
/>
173161
</section>
174162
)
175163
}

0 commit comments

Comments
 (0)