Update src/app/blog/page.tsx

This commit is contained in:
2026-02-04 23:08:55 +00:00
parent 1d07800757
commit acef58f5aa

View File

@@ -23,16 +23,16 @@ type BlogPost = {
const defaultPosts: BlogPost[] = [ const defaultPosts: BlogPost[] = [
{ {
id: "1", category: "Design", title: "UX review presentations", excerpt: "How do you create compelling presentations that wow your colleagues and impress your managers?", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Abstract design with purple and silver tones", authorName: "Olivia Rhye", authorAvatar: "/placeholders/placeholder3.avif", date: "20 Jan 2025", onBlogClick: () => console.log("Blog 1 clicked"), id: "1", category: "Training", title: "The Science Behind Effective Strength Training", excerpt: "Discover the principles that make strength training effective, from progressive overload to proper recovery. Learn how to structure your training for maximum results.", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Strength training form and technique", authorName: "Personal Trainer", authorAvatar: "/placeholders/placeholder3.avif", date: "20 Jan 2025", onBlogClick: () => console.log("Blog 1 clicked"),
}, },
{ {
id: "2", category: "Development", title: "Building scalable applications", excerpt: "Learn the best practices for building applications that can handle millions of users.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Development workspace", authorName: "John Smith", authorAvatar: "/placeholders/placeholder4.webp", date: "18 Jan 2025", onBlogClick: () => console.log("Blog 2 clicked"), id: "2", category: "Nutrition", title: "Nutrition Strategies That Support Your Fitness Goals", excerpt: "Learn how to fuel your body properly for optimal performance and recovery. From macronutrient timing to hydration strategies, discover nutrition fundamentals.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Healthy nutrition and meal planning", authorName: "Personal Trainer", authorAvatar: "/placeholders/placeholder4.webp", date: "18 Jan 2025", onBlogClick: () => console.log("Blog 2 clicked"),
}, },
{ {
id: "3", category: "Marketing", title: "Content strategy essentials", excerpt: "Discover how to create a content strategy that drives engagement and conversions.", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Marketing strategy board", authorName: "Sarah Johnson", authorAvatar: "/placeholders/placeholder3.avif", date: "15 Jan 2025", onBlogClick: () => console.log("Blog 3 clicked"), id: "3", category: "Mindset", title: "Building the Mental Strength to Achieve Your Fitness Goals", excerpt: "Physical transformation starts with mental resilience. Explore practical strategies for overcoming obstacles, staying motivated, and building lasting habits.", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Mental resilience and fitness mindset", authorName: "Personal Trainer", authorAvatar: "/placeholders/placeholder3.avif", date: "15 Jan 2025", onBlogClick: () => console.log("Blog 3 clicked"),
}, },
{ {
id: "4", category: "Product", title: "Product management 101", excerpt: "Everything you need to know to become an effective product manager in 2025.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Product planning session", authorName: "Mike Davis", authorAvatar: "/placeholders/placeholder4.webp", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"), id: "4", category: "Recovery", title: "Why Recovery is Just as Important as Training", excerpt: "Rest and recovery aren't optional. Learn how sleep, stretching, and active recovery enhance your training results and prevent injury.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Recovery and rest strategies", authorName: "Personal Trainer", authorAvatar: "/placeholders/placeholder4.webp", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"),
}, },
]; ];
@@ -65,7 +65,7 @@ export default function BlogPage() {
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
const mappedPosts = data.map((post: any) => ({ const mappedPosts = data.map((post: any) => ({
id: post.id || String(Math.random()), id: post.id || String(Math.random()),
category: post.category || "General", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "/placeholders/placeholder3.avif", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Anonymous", authorAvatar: post.author?.avatar || "/placeholders/placeholder3.avif", date: post.date || post.createdAt || new Date().toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }), category: post.category || "General", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "/placeholders/placeholder3.avif", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Personal Trainer", authorAvatar: post.author?.avatar || "/placeholders/placeholder3.avif", date: post.date || post.createdAt || new Date().toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }),
onBlogClick: () => console.log(`Blog ${post.id} clicked`), onBlogClick: () => console.log(`Blog ${post.id} clicked`),
})); }));
setPosts(mappedPosts); setPosts(mappedPosts);
@@ -102,14 +102,14 @@ export default function BlogPage() {
navItems={[ navItems={[
{ name: "Home", id: "/" }, { name: "Home", id: "/" },
{ name: "About", id: "about" }, { name: "About", id: "about" },
{ name: "Achievements", id: "achievements" }, { name: "Certifications", id: "achievements" },
{ name: "Services", id: "services" }, { name: "Services", id: "services" },
{ name: "Philosophy", id: "philosophy" }, { name: "Approach", id: "philosophy" },
{ name: "Contact", id: "contact" } { name: "Contact", id: "contact" }
]} ]}
brandName="Rory Gibbs" brandName="Personal Trainer"
bottomLeftText="Olympic Champion" bottomLeftText="Certified Professional"
bottomRightText="hello@rorygibbs.com" bottomRightText="contact@trainer.com"
/> />
{isLoading ? ( {isLoading ? (
@@ -119,8 +119,8 @@ export default function BlogPage() {
) : ( ) : (
<BlogCardTwo <BlogCardTwo
blogs={posts} blogs={posts}
title="Latest Insights from an Olympic Champion" title="Fitness Training Insights & Tips"
description="Stay updated with training insights, performance strategies, and behind-the-scenes content from Rory Gibbs" description="Expert advice on training, nutrition, recovery, and mindset from a certified personal trainer"
textboxLayout="default" textboxLayout="default"
useInvertedBackground="noInvert" useInvertedBackground="noInvert"
animationType="slide-up" animationType="slide-up"
@@ -130,17 +130,17 @@ export default function BlogPage() {
)} )}
<FooterCard <FooterCard
logoText="Rory Gibbs" logoText="Personal Trainer"
copyrightText="© 2025 Rory Gibbs. Olympic Champion. All rights reserved." copyrightText="© 2025 Professional Personal Training. All rights reserved."
socialLinks={[ socialLinks={[
{ icon: Instagram, href: "https://instagram.com/rorygibbs", ariaLabel: "Instagram" }, { icon: Instagram, href: "https://instagram.com", ariaLabel: "Instagram" },
{ icon: Twitter, href: "https://twitter.com/rorygibbs", ariaLabel: "Twitter" }, { icon: Twitter, href: "https://twitter.com", ariaLabel: "Twitter" },
{ icon: Linkedin, href: "https://linkedin.com/in/rorygibbs", ariaLabel: "LinkedIn" }, { icon: Linkedin, href: "https://linkedin.com", ariaLabel: "LinkedIn" },
{ icon: Mail, href: "mailto:hello@rorygibbs.com", ariaLabel: "Email" } { icon: Mail, href: "mailto:contact@trainer.com", ariaLabel: "Email" }
]} ]}
/> />
</div> </div>
</ReactLenis> </ReactLenis>
</ThemeProvider> </ThemeProvider>
); );
} }