diff --git a/app/[locale]/[slug]/page.tsx b/app/[locale]/[slug]/page.tsx index 9ad882c4..af58ce51 100644 --- a/app/[locale]/[slug]/page.tsx +++ b/app/[locale]/[slug]/page.tsx @@ -1,8 +1,10 @@ import { notFound } from 'next/navigation'; import { MDXRemote } from 'next-mdx-remote/rsc'; -import { Section, Container, Heading, Badge } from '@/components/ui'; +import { Container, Badge } from '@/components/ui'; import { getTranslations } from 'next-intl/server'; import { Metadata } from 'next'; +import { getPageBySlug } from '@/lib/pages'; +import { mdxComponents } from '@/components/blog/MDXComponents'; interface PageProps { params: { @@ -12,7 +14,6 @@ interface PageProps { } export async function generateMetadata({ params: { locale, slug } }: PageProps): Promise { - const { getPageBySlug } = await import('@/lib/pages'); const pageData = await getPageBySlug(slug, locale); if (!pageData) return {}; @@ -42,7 +43,6 @@ export async function generateMetadata({ params: { locale, slug } }: PageProps): } export default async function StandardPage({ params: { locale, slug } }: PageProps) { - const { getPageBySlug } = await import('@/lib/pages'); const pageData = await getPageBySlug(slug, locale); const t = await getTranslations('StandardPage'); @@ -51,7 +51,7 @@ export default async function StandardPage({ params: { locale, slug } }: PagePro } return ( -
+
{/* Hero Section */}
@@ -60,67 +60,44 @@ export default async function StandardPage({ params: { locale, slug } }: PagePro
{t('badge')} - - {pageData.frontmatter.title} - +

+ {pageData.frontmatter.title} +

-
- -
- {/* Sticky Narrative Sidebar - Mobile Optimized */} -
-
- {/* Mobile-only chip/stepper feel */} -
- {t('overview')} - {t('details')} - {t('support')} -
- -
-

- - {t('quickNavigation')} -

- -
- -
-
-

{t('needHelp')}

-

{t('supportTeamAvailable')}

- - {t('contactUs')} - - -
-
+ {/* Main Content Area */} +
+
+ {/* Excerpt/Lead paragraph if available */} + {pageData.frontmatter.excerpt && ( +
+

+ {pageData.frontmatter.excerpt} +

+ )} - {/* Main Content */} -
-
- -
+ {/* Main content with shared blog components */} +
+ +
+ + {/* Support Section */} +
+
+
+

{t('needHelp')}

+

{t('supportTeamAvailable')}

+ + {t('contactUs')} + +
- -
+
+
); } diff --git a/app/[locale]/blog/[slug]/page.tsx b/app/[locale]/blog/[slug]/page.tsx index b6f9c647..95c23d50 100644 --- a/app/[locale]/blog/[slug]/page.tsx +++ b/app/[locale]/blog/[slug]/page.tsx @@ -5,6 +5,11 @@ import { getBreadcrumbSchema, SITE_URL, LOGO_URL } from '@/lib/schema'; import { MDXRemote } from 'next-mdx-remote/rsc'; import { getPostBySlug, getAdjacentPosts, getReadingTime, getHeadings } from '@/lib/blog'; import { Metadata } from 'next'; +import Link from 'next/link'; +import PostNavigation from '@/components/blog/PostNavigation'; +import PowerCTA from '@/components/blog/PowerCTA'; +import TableOfContents from '@/components/blog/TableOfContents'; +import { mdxComponents } from '@/components/blog/MDXComponents'; interface BlogPostProps { params: { @@ -46,151 +51,6 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro }; } -import Link from 'next/link'; -import VisualLinkPreview from '@/components/blog/VisualLinkPreview'; -import { Callout } from '@/components/ui'; -import HighlightBox from '@/components/blog/HighlightBox'; -import Stats from '@/components/blog/Stats'; -import AnimatedImage from '@/components/blog/AnimatedImage'; -import ChatBubble from '@/components/blog/ChatBubble'; -import SplitHeading from '@/components/blog/SplitHeading'; -import PostNavigation from '@/components/blog/PostNavigation'; -import PowerCTA from '@/components/blog/PowerCTA'; -import TableOfContents from '@/components/blog/TableOfContents'; -import StickyNarrative from '@/components/blog/StickyNarrative'; -import TechnicalGrid from '@/components/blog/TechnicalGrid'; -import ComparisonGrid from '@/components/blog/ComparisonGrid'; - -const components = { - VisualLinkPreview, - Callout, - HighlightBox, - Stats, - AnimatedImage, - ChatBubble, - PowerCTA, - SplitHeading, - StickyNarrative, - TechnicalGrid, - ComparisonGrid, - h1: () => null, - a: ({ href, children, ...props }: any) => { - if (href?.startsWith('/')) { - return ( - - {children} - - ); - } - return ( - - {children} - - - - - ); - }, - img: (props: any) => ( - - ), - h2: ({ children, ...props }: any) => ( - - {children} - - ), - h3: ({ children, ...props }: any) => ( -

- {children} -

- ), - p: ({ children, ...props }: any) => ( -

- {children} -

- ), - ul: ({ children, ...props }: any) => ( - - ), - ol: ({ children, ...props }: any) => ( -
    - {children} -
- ), - li: ({ children, ...props }: any) => ( -
  • - - - - - - {children} -
  • - ), - blockquote: ({ children, ...props }: any) => ( -
    -
    - {children} -
    -
    - ), - strong: ({ children, ...props }: any) => ( - - {children} - - ), - code: ({ children, ...props }: any) => ( - - {children} - - ), - pre: ({ children, ...props }: any) => ( -
    -      {children}
    -    
    - ), - table: ({ children, ...props }: any) => ( -
    - - {children} -
    -
    - ), - thead: ({ children, ...props }: any) => ( - - {children} - - ), - tbody: ({ children, ...props }: any) => ( - - {children} - - ), - tr: ({ children, ...props }: any) => ( - - {children} - - ), - th: ({ children, ...props }: any) => ( - - {children} - - ), - td: ({ children, ...props }: any) => ( - - {children} - - ), -}; - export default async function BlogPost({ params: { locale, slug } }: BlogPostProps) { const post = await getPostBySlug(slug, locale); const { prev, next } = await getAdjacentPosts(slug, locale); @@ -286,7 +146,7 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro {/* Main content with enhanced styling */}
    - +
    {/* Power CTA */} diff --git a/components/Footer.tsx b/components/Footer.tsx index 66092f29..073408ac 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -44,9 +44,9 @@ export default function Footer() {

    {t('legal')}

      -
    • {t('legalNotice')}
    • -
    • {t('privacyPolicy')}
    • -
    • {t('terms')}
    • +
    • {t('legalNotice')}
    • +
    • {t('privacyPolicy')}
    • +
    • {t('terms')}
    @@ -65,13 +65,27 @@ export default function Footer() {

    {t('recentPosts')}