Update src/app/blog/page.tsx
This commit is contained in:
@@ -23,39 +23,39 @@ 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: "Cosmetic Dentistry", title: "The Art of Smile Design", excerpt: "Discover how our digital smile design technology helps you visualize your perfect smile before treatment begins.", imageSrc: "https://images.unsplash.com/photo-1588776694971-91b1560f9b5e?w=800&h=600&fit=crop", imageAlt: "Smile design consultation", authorName: "Dr. Elizabeth Foster", authorAvatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop", 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: "Dental Technology", title: "Advanced Implant Solutions", excerpt: "Learn how modern dental implant technology restores function and beauty with natural-looking results.", imageSrc: "https://images.unsplash.com/photo-1606811841689-23def00b0ae4?w=800&h=600&fit=crop", imageAlt: "Dental implant technology", authorName: "Dr. Michael Chang", authorAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=400&fit=crop", 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: "Preventive Care", title: "Maintaining Your Perfect Smile", excerpt: "Expert tips on maintaining your dental health and preserving your beautiful smile for life.", imageSrc: "https://images.unsplash.com/photo-1579154204601-01d8d844e250?w=800&h=600&fit=crop", imageAlt: "Preventive dental care", authorName: "Dr. Sarah Johnson", authorAvatar: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=400&h=400&fit=crop", 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: "Patient Stories", title: "Smile Transformations: Real Results", excerpt: "See how our patients' lives changed when they invested in their smiles through our personalized treatments.", imageSrc: "https://images.unsplash.com/photo-1631217174556-e5b42bb30ac4?w=800&h=600&fit=crop", imageAlt: "Smile transformation results", authorName: "Dr. James Mitchell", authorAvatar: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&h=400&fit=crop", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"),
|
||||
},
|
||||
];
|
||||
|
||||
const footerColumns: FooterColumn[] = [
|
||||
{
|
||||
title: "Product", items: [
|
||||
{ label: "Features", href: "/features" },
|
||||
{ label: "Pricing", href: "/pricing" },
|
||||
{ label: "FAQ", href: "/faq" },
|
||||
title: "Services", items: [
|
||||
{ label: "Cosmetic Dentistry", href: "#services" },
|
||||
{ label: "Dental Implants", href: "#services" },
|
||||
{ label: "Orthodontics", href: "#services" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About", href: "/about" },
|
||||
{ label: "Blog", href: "/blog" },
|
||||
{ label: "Careers", href: "/careers" },
|
||||
title: "Practice", items: [
|
||||
{ label: "About Us", href: "#about" },
|
||||
{ label: "Our Team", href: "#team" },
|
||||
{ label: "Contact", href: "#contact" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Resources", items: [
|
||||
{ label: "Documentation", href: "/docs" },
|
||||
{ label: "Support", href: "/support" },
|
||||
{ label: "Contact", href: "/contact" },
|
||||
{ label: "Blog", href: "/blog" },
|
||||
{ label: "Patient Forms", href: "#" },
|
||||
{ label: "Smile Gallery", href: "#" },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -88,7 +88,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 || "Dental Care", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "https://images.unsplash.com/photo-1588776694971-91b1560f9b5e?w=800&h=600&fit=crop", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Anonymous", authorAvatar: post.author?.avatar || "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop", 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);
|
||||
@@ -122,26 +122,25 @@ export default function BlogPage() {
|
||||
<ReactLenis root>
|
||||
<div className="min-h-screen bg-background">
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="Pizzeria Madrid"
|
||||
brandName="Luxury Dental Care"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/home" },
|
||||
{ name: "Home", id: "hero" },
|
||||
{ name: "Pizzas", id: "pizzas" },
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Services", id: "services" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Contact", id: "contact" }
|
||||
]}
|
||||
button={{ text: "Reserve Now", href: "#contact" }}
|
||||
button={{ text: "Schedule Consultation", href: "#contact" }}
|
||||
/>
|
||||
|
||||
{isLoading ? (
|
||||
<div className="w-content-width mx-auto py-20 text-center">
|
||||
<p className="text-foreground">Loading posts...</p>
|
||||
<p className="text-foreground">Loading articles...</p>
|
||||
</div>
|
||||
) : (
|
||||
<BlogCardOne
|
||||
blogs={posts}
|
||||
title="Latest Articles"
|
||||
description="Stay updated with our latest insights"
|
||||
title="Dental Care Insights"
|
||||
description="Learn from our expert dentists about the latest in cosmetic, restorative, and preventive dental care"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground="noInvert"
|
||||
carouselMode="buttons"
|
||||
@@ -150,31 +149,31 @@ export default function BlogPage() {
|
||||
)}
|
||||
|
||||
<FooterBase
|
||||
logoText="Pizzeria Madrid"
|
||||
copyrightText="© 2025 Pizzeria Madrid | Authentic Italian Pizza Since 2008"
|
||||
logoText="Luxury Dental Care California"
|
||||
copyrightText="© 2025 Luxury Dental Care | Premium Dentistry Since 2005"
|
||||
columns={[
|
||||
{
|
||||
title: "Menu", items: [
|
||||
{ label: "Our Pizzas", href: "pizzas" },
|
||||
{ label: "Appetizers", href: "#" },
|
||||
{ label: "Desserts", href: "#" },
|
||||
{ label: "Beverages", href: "#" }
|
||||
title: "Services", items: [
|
||||
{ label: "Cosmetic Dentistry", href: "#services" },
|
||||
{ label: "Dental Implants", href: "#services" },
|
||||
{ label: "Orthodontics", href: "#services" },
|
||||
{ label: "Restorative Care", href: "#services" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Restaurant", items: [
|
||||
{ label: "About Us", href: "about" },
|
||||
{ label: "Hours", href: "#" },
|
||||
{ label: "Location", href: "#" },
|
||||
{ label: "Contact", href: "contact" }
|
||||
title: "Practice", items: [
|
||||
{ label: "About Us", href: "#about" },
|
||||
{ label: "Our Team", href: "#team" },
|
||||
{ label: "Technology", href: "#features" },
|
||||
{ label: "Contact", href: "#contact" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Connect", items: [
|
||||
{ label: "Instagram", href: "https://instagram.com" },
|
||||
{ label: "Facebook", href: "https://facebook.com" },
|
||||
{ label: "Twitter", href: "https://twitter.com" },
|
||||
{ label: "Reviews", href: "#" }
|
||||
{ label: "Google Reviews", href: "https://google.com" },
|
||||
{ label: "Blog", href: "/blog" }
|
||||
]
|
||||
}
|
||||
]}
|
||||
@@ -183,4 +182,4 @@ export default function BlogPage() {
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user