@@ -3,6 +3,8 @@ import Link from 'next/link'
33import Image from 'next/image'
44import HeroSimple from '@/components/HeroSimple'
55import CTA from '@/components/CTA'
6+ import { Reveal } from '@/components/Reveal'
7+ import SectionLabel from '@/components/SectionLabel'
68import { getAllBlogPosts } from '@/lib/sanity.client'
79import { urlFor } from '@/lib/sanity.image'
810
@@ -41,92 +43,96 @@ export default async function Blog() {
4143 title = "Blog"
4244 subtitle = "Practical insights on technology, AI, and building smarter systems, without the jargon."
4345 maxWidth = "max-w-6xl"
46+ label = "Blog"
4447 />
4548
4649 { /* Blog Grid */ }
47- < section className = "py-20 bg-cream" >
48- < div className = "max-w-6xl mx-auto px-6" >
50+ < section className = "py-24 md:py-32 bg-cream" >
51+ < div className = "max-w-6xl mx-auto px-6 md:px-12 " >
4952 { /* Featured Post */ }
5053 { featuredPost && (
51- < Link
52- href = { `/blog/${ featuredPost . slug } ` }
53- className = "block bg-white rounded-3xl overflow-hidden mb-16 hover:shadow-xl transition-shadow duration-300 no-underline text-charcoal"
54- >
55- < div className = "grid md:grid-cols-2" >
56- { featuredPost . featuredImage ?. asset ? (
57- < div className = "relative h-64 md:h-auto" >
58- < Image
59- src = { urlFor ( featuredPost . featuredImage . asset ) . width ( 800 ) . height ( 600 ) . url ( ) }
60- alt = { featuredPost . featuredImage . alt || featuredPost . title }
61- fill
62- className = "object-cover"
63- sizes = "(max-width: 768px) 100vw, 50vw"
64- />
65- </ div >
66- ) : (
67- < div className = "bg-sage-light h-64 md:h-auto flex items-center justify-center text-8xl" >
68- 🤖
69- </ div >
70- ) }
71- < div className = "p-8 md:p-12 flex flex-col justify-center" >
72- < span className = "inline-block px-4 py-1.5 bg-coral text-white text-sm font-semibold rounded-full mb-5 w-fit" >
73- Featured
74- </ span >
75- < h2 className = "text-2xl md:text-3xl font-semibold mb-4 leading-tight" >
76- { featuredPost . title }
77- </ h2 >
78- < p className = "text-charcoal-light mb-6" >
79- { featuredPost . excerpt || 'Read more to learn about this topic.' }
80- </ p >
81- < div className = "flex items-center gap-4 text-sm text-charcoal-light mb-4" >
82- < span > { featuredPost . author } </ span >
83- < span > •</ span >
84- < time > { new Date ( featuredPost . publishedAt ) . toLocaleDateString ( 'en-US' , { month : 'long' , day : 'numeric' , year : 'numeric' } ) } </ time >
85- </ div >
86- < span className = "text-coral font-semibold" > Read the full article →</ span >
87- </ div >
88- </ div >
89- </ Link >
90- ) }
91-
92- { /* Remaining Posts Grid */ }
93- { remainingPosts . length > 0 && (
94- < div className = "grid md:grid-cols-2 lg:grid-cols-3 gap-8" >
95- { remainingPosts . map ( ( post ) => (
96- < Link
97- key = { post . _id }
98- href = { `/blog/${ post . slug } ` }
99- className = "block bg-white rounded-3xl overflow-hidden hover:shadow-xl transition-shadow duration-300 no-underline text-charcoal"
100- >
101- { post . featuredImage ?. asset ? (
102- < div className = "relative h-48" >
54+ < Reveal >
55+ < Link
56+ href = { `/blog/${ featuredPost . slug } ` }
57+ className = "block bg-white rounded-3xl overflow-hidden mb-16 hover:shadow-xl transition-shadow duration-300 no-underline text-charcoal"
58+ >
59+ < div className = "grid md:grid-cols-2" >
60+ { featuredPost . featuredImage ?. asset ? (
61+ < div className = "relative h-64 md:h-auto" >
10362 < Image
104- src = { urlFor ( post . featuredImage . asset ) . width ( 600 ) . height ( 400 ) . url ( ) }
105- alt = { post . featuredImage . alt || post . title }
63+ src = { urlFor ( featuredPost . featuredImage . asset ) . width ( 800 ) . height ( 600 ) . url ( ) }
64+ alt = { featuredPost . featuredImage . alt || featuredPost . title }
10665 fill
10766 className = "object-cover"
108- sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw "
67+ sizes = "(max-width: 768px) 100vw, 50vw"
10968 />
11069 </ div >
11170 ) : (
112- < div className = "bg-sage-light h-48 flex items-center justify-center text-6xl " >
113- 📝
71+ < div className = "bg-sage-light h-64 md:h-auto flex items-center justify-center text-8xl " >
72+ 🤖
11473 </ div >
11574 ) }
116- < div className = "p-6" >
117- < h3 className = "text-xl font-semibold mb-3 leading-tight" >
118- { post . title }
119- </ h3 >
120- < p className = "text-charcoal-light text-sm mb-4 line-clamp-3" >
121- { post . excerpt || 'Read more to learn about this topic.' }
75+ < div className = "p-8 md:p-12 flex flex-col justify-center" >
76+ < span className = "inline-block px-4 py-1.5 bg-coral text-white text-sm font-semibold rounded-full mb-5 w-fit" >
77+ Featured
78+ </ span >
79+ < h2 className = "text-2xl md:text-3xl font-display font-bold mb-4 leading-tight" >
80+ { featuredPost . title }
81+ </ h2 >
82+ < p className = "text-charcoal-light mb-6" >
83+ { featuredPost . excerpt || 'Read more to learn about this topic.' }
12284 </ p >
123- < div className = "flex items-center gap-2 text-xs text-charcoal-light" >
124- < span > { post . author } </ span >
85+ < div className = "flex items-center gap-4 text-sm text-charcoal-light mb-4 " >
86+ < span > { featuredPost . author } </ span >
12587 < span > •</ span >
126- < time > { new Date ( post . publishedAt ) . toLocaleDateString ( 'en-US' , { month : 'short ' , day : 'numeric' , year : 'numeric' } ) } </ time >
88+ < time > { new Date ( featuredPost . publishedAt ) . toLocaleDateString ( 'en-US' , { month : 'long ' , day : 'numeric' , year : 'numeric' } ) } </ time >
12789 </ div >
90+ < span className = "text-coral font-semibold" > Read the full article →</ span >
12891 </ div >
129- </ Link >
92+ </ div >
93+ </ Link >
94+ </ Reveal >
95+ ) }
96+
97+ { /* Remaining Posts Grid */ }
98+ { remainingPosts . length > 0 && (
99+ < div className = "grid md:grid-cols-2 lg:grid-cols-3 gap-8" >
100+ { remainingPosts . map ( ( post , i ) => (
101+ < Reveal key = { post . _id } delay = { i * 0.08 } >
102+ < Link
103+ href = { `/blog/${ post . slug } ` }
104+ className = "block bg-white rounded-3xl overflow-hidden hover:shadow-xl transition-shadow duration-300 no-underline text-charcoal"
105+ >
106+ { post . featuredImage ?. asset ? (
107+ < div className = "relative h-48" >
108+ < Image
109+ src = { urlFor ( post . featuredImage . asset ) . width ( 600 ) . height ( 400 ) . url ( ) }
110+ alt = { post . featuredImage . alt || post . title }
111+ fill
112+ className = "object-cover"
113+ sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
114+ />
115+ </ div >
116+ ) : (
117+ < div className = "bg-sage-light h-48 flex items-center justify-center text-6xl" >
118+ 📝
119+ </ div >
120+ ) }
121+ < div className = "p-6" >
122+ < h3 className = "text-xl font-display font-bold mb-3 leading-tight" >
123+ { post . title }
124+ </ h3 >
125+ < p className = "text-charcoal-light text-sm mb-4 line-clamp-3" >
126+ { post . excerpt || 'Read more to learn about this topic.' }
127+ </ p >
128+ < div className = "flex items-center gap-2 text-xs text-charcoal-light" >
129+ < span > { post . author } </ span >
130+ < span > •</ span >
131+ < time > { new Date ( post . publishedAt ) . toLocaleDateString ( 'en-US' , { month : 'short' , day : 'numeric' , year : 'numeric' } ) } </ time >
132+ </ div >
133+ </ div >
134+ </ Link >
135+ </ Reveal >
130136 ) ) }
131137 </ div >
132138 ) }
0 commit comments