Skip to content

Commit 49d6508

Browse files
authored
Merge pull request #757 from zackproser/codex/improve-products-landing-page-design
Improve products landing page
2 parents 1806c6e + a275330 commit 49d6508

File tree

1 file changed

+49
-8
lines changed

1 file changed

+49
-8
lines changed

src/app/products/products-client.tsx

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import Link from 'next/link'
99
import { motion } from 'framer-motion'
1010
import RandomPortrait from '@/components/RandomPortrait'
1111
import RenderNumYearsExperience from '@/components/NumYearsExperience'
12+
import { RealTestimonials } from '@/components/RealTestimonials'
13+
import { Footer } from '@/components/Footer'
1214

1315
// Company logos
1416
import logoWorkOS from '@/images/logos/workos.svg'
@@ -22,6 +24,12 @@ export default function ProductsPageClient({ products }: { products: ProductCont
2224
// No filters needed, directly use all products
2325
const canvasRef = useRef<HTMLCanvasElement>(null)
2426

27+
const lowestPriced = products.reduce((prev, curr) =>
28+
curr.pricing.price < prev.pricing.price ? curr : prev,
29+
products[0]
30+
)
31+
const lowestPriceSlug = lowestPriced.slug.split('/').pop()
32+
2533
// Terminal-style hacker animation effect with value prop
2634
useEffect(() => {
2735
if (!canvasRef.current) return
@@ -318,17 +326,27 @@ export default function ProductsPageClient({ products }: { products: ProductCont
318326
<div className="relative">
319327
{/* Hero section with terminal animation */}
320328
<div className="mb-4 relative">
321-
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl mb-4 max-w-3xl mx-auto text-center">
329+
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl mb-2 max-w-3xl mx-auto text-center">
322330
Supercharge your career
323331
</h1>
324-
325-
<div className="h-[240px] relative bg-transparent">
326-
<canvas
327-
ref={canvasRef}
332+
<p className="text-lg text-zinc-600 dark:text-zinc-400 text-center max-w-xl mx-auto">
333+
Master developer tools with expert guides and tutorials
334+
</p>
335+
<div className="h-[240px] relative bg-transparent mt-4">
336+
<canvas
337+
ref={canvasRef}
328338
className="absolute inset-0 bg-transparent"
329-
aria-hidden="true"
339+
aria-hidden="true"
330340
/>
331341
</div>
342+
<div className="mt-4 flex justify-center">
343+
<Link
344+
href="/tutorials"
345+
className="rounded-md bg-emerald-600 px-5 py-3 text-white font-medium hover:bg-emerald-700"
346+
>
347+
Explore Tutorials
348+
</Link>
349+
</div>
332350
</div>
333351

334352
{/* Category Filter completely removed */}
@@ -346,12 +364,17 @@ export default function ProductsPageClient({ products }: { products: ProductCont
346364
initial="hidden"
347365
animate="visible"
348366
variants={productVariants}
349-
className="group flex flex-col overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-700 transition-all hover:border-zinc-400 dark:hover:border-zinc-500 hover:shadow-lg"
367+
className="group flex flex-col overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 transition-all hover:border-zinc-400 dark:hover:border-zinc-500 hover:shadow-lg"
350368
>
351369
{/* Product Image */}
352370
<div className="relative h-64 w-full overflow-hidden bg-zinc-100 dark:bg-zinc-800">
371+
{product.pricing.price === lowestPriced.pricing.price && (
372+
<span className="absolute top-2 left-2 z-10 rounded-md bg-emerald-600 px-2 py-1 text-xs font-semibold text-white">
373+
Most Popular
374+
</span>
375+
)}
353376
{product.heroImage ? (
354-
<Image
377+
<Image
355378
src={product.heroImage}
356379
alt={product.title}
357380
fill
@@ -396,6 +419,7 @@ export default function ProductsPageClient({ products }: { products: ProductCont
396419
<div className="mt-6 flex items-center justify-between">
397420
<div className="text-lg font-bold text-zinc-900 dark:text-zinc-50">
398421
{product.pricing.currency}{product.pricing.price}
422+
<span className="ml-1 text-sm font-normal text-zinc-500 dark:text-zinc-400">&nbsp;&ndash; One-time payment, lifetime access</span>
399423
</div>
400424

401425
<button
@@ -416,6 +440,15 @@ export default function ProductsPageClient({ products }: { products: ProductCont
416440
</div>
417441

418442
{/* No "products not found" message needed */}
443+
444+
<div className="mt-20">
445+
<RealTestimonials count={3} />
446+
</div>
447+
448+
<div className="mt-12 rounded-lg bg-emerald-50 dark:bg-emerald-900/30 p-6 max-w-3xl mx-auto text-center">
449+
<p className="text-lg font-semibold text-emerald-800 dark:text-emerald-200">30-Day Risk-Free Trial</p>
450+
<p className="mt-2 text-sm text-emerald-700 dark:text-emerald-300">If you&apos;re not satisfied, get a full refund within 30 days.</p>
451+
</div>
419452

420453
{/* Author Section */}
421454
<section
@@ -437,6 +470,7 @@ export default function ProductsPageClient({ products }: { products: ProductCont
437470
</h2>
438471
<div className="mt-6 space-y-6 text-base text-slate-700 dark:text-slate-300">
439472
<p>I&apos;m a software engineer with over {RenderNumYearsExperience()} years of experience building production systems. I create high-quality resources that help developers learn practical skills without the fluff.</p>
473+
<p className="font-medium text-zinc-700 dark:text-zinc-300">50K+ developers taught through my guides and workshops.</p>
440474
<div className="mt-8 flex flex-col space-y-5">
441475
{[
442476
{
@@ -522,6 +556,13 @@ export default function ProductsPageClient({ products }: { products: ProductCont
522556
</div>
523557
</section>
524558
</div>
559+
<Footer />
560+
<Link
561+
href={`/products/${lowestPriceSlug}`}
562+
className="md:hidden fixed bottom-4 right-4 z-50 rounded-full bg-emerald-600 px-5 py-3 text-sm font-medium text-white shadow-lg"
563+
>
564+
Buy Now
565+
</Link>
525566
</Container>
526567
)
527568
}

0 commit comments

Comments
 (0)