Update src/app/blog/page.tsx
This commit is contained in:
@@ -23,16 +23,16 @@ type 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) {
|
||||
const mappedPosts = data.map((post: any) => ({
|
||||
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`),
|
||||
}));
|
||||
setPosts(mappedPosts);
|
||||
@@ -102,14 +102,14 @@ export default function BlogPage() {
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Achievements", id: "achievements" },
|
||||
{ name: "Certifications", id: "achievements" },
|
||||
{ name: "Services", id: "services" },
|
||||
{ name: "Philosophy", id: "philosophy" },
|
||||
{ name: "Approach", id: "philosophy" },
|
||||
{ name: "Contact", id: "contact" }
|
||||
]}
|
||||
brandName="Rory Gibbs"
|
||||
bottomLeftText="Olympic Champion"
|
||||
bottomRightText="hello@rorygibbs.com"
|
||||
brandName="Personal Trainer"
|
||||
bottomLeftText="Certified Professional"
|
||||
bottomRightText="contact@trainer.com"
|
||||
/>
|
||||
|
||||
{isLoading ? (
|
||||
@@ -119,8 +119,8 @@ export default function BlogPage() {
|
||||
) : (
|
||||
<BlogCardTwo
|
||||
blogs={posts}
|
||||
title="Latest Insights from an Olympic Champion"
|
||||
description="Stay updated with training insights, performance strategies, and behind-the-scenes content from Rory Gibbs"
|
||||
title="Fitness Training Insights & Tips"
|
||||
description="Expert advice on training, nutrition, recovery, and mindset from a certified personal trainer"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground="noInvert"
|
||||
animationType="slide-up"
|
||||
@@ -130,17 +130,17 @@ export default function BlogPage() {
|
||||
)}
|
||||
|
||||
<FooterCard
|
||||
logoText="Rory Gibbs"
|
||||
copyrightText="© 2025 Rory Gibbs. Olympic Champion. All rights reserved."
|
||||
logoText="Personal Trainer"
|
||||
copyrightText="© 2025 Professional Personal Training. All rights reserved."
|
||||
socialLinks={[
|
||||
{ icon: Instagram, href: "https://instagram.com/rorygibbs", ariaLabel: "Instagram" },
|
||||
{ icon: Twitter, href: "https://twitter.com/rorygibbs", ariaLabel: "Twitter" },
|
||||
{ icon: Linkedin, href: "https://linkedin.com/in/rorygibbs", ariaLabel: "LinkedIn" },
|
||||
{ icon: Mail, href: "mailto:hello@rorygibbs.com", ariaLabel: "Email" }
|
||||
{ icon: Instagram, href: "https://instagram.com", ariaLabel: "Instagram" },
|
||||
{ icon: Twitter, href: "https://twitter.com", ariaLabel: "Twitter" },
|
||||
{ icon: Linkedin, href: "https://linkedin.com", ariaLabel: "LinkedIn" },
|
||||
{ icon: Mail, href: "mailto:contact@trainer.com", ariaLabel: "Email" }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user