diff --git a/app/[locale]/[slug]/page.tsx b/app/[locale]/[slug]/page.tsx new file mode 100644 index 00000000..4932c1ca --- /dev/null +++ b/app/[locale]/[slug]/page.tsx @@ -0,0 +1,36 @@ +import { notFound } from 'next/navigation'; +import { MDXRemote } from 'next-mdx-remote/rsc'; +import { getPostBySlug } from '@/lib/blog'; + +interface PageProps { + params: { + locale: string; + slug: string; + }; +} + +export default async function StandardPage({ params: { locale, slug } }: PageProps) { + const page = await getPostBySlug(slug, locale); // Reusing blog logic for now as structure is same + + // If not found in blog, try pages directory (we need to implement getPageBySlug) + // Actually, let's implement getPageBySlug in lib/mdx.ts or similar + + // For now, let's assume we use a unified loader or separate. + // Let's use a separate loader for pages. + + const { getPageBySlug } = await import('@/lib/pages'); + const pageData = await getPageBySlug(slug, locale); + + if (!pageData) { + notFound(); + } + + return ( +
+

{pageData.frontmatter.title}

+
+ +
+
+ ); +} diff --git a/app/[locale]/blog/[slug]/page.tsx b/app/[locale]/blog/[slug]/page.tsx new file mode 100644 index 00000000..9b11898e --- /dev/null +++ b/app/[locale]/blog/[slug]/page.tsx @@ -0,0 +1,48 @@ +import { notFound } from 'next/navigation'; +import { MDXRemote } from 'next-mdx-remote/rsc'; +import { getPostBySlug } from '@/lib/blog'; + +interface BlogPostProps { + params: { + locale: string; + slug: string; + }; +} + +export default async function BlogPost({ params: { locale, slug } }: BlogPostProps) { + const post = await getPostBySlug(slug, locale); + + if (!post) { + notFound(); + } + + return ( +
+
+
+ {new Date(post.frontmatter.date).toLocaleDateString(locale, { + year: 'numeric', + month: 'long', + day: 'numeric' + })} +
+

+ {post.frontmatter.title} +

+ {post.frontmatter.featuredImage && ( +
+ {post.frontmatter.title} +
+ )} +
+ +
+ +
+
+ ); +} diff --git a/app/[locale]/blog/page.tsx b/app/[locale]/blog/page.tsx new file mode 100644 index 00000000..c30db6b3 --- /dev/null +++ b/app/[locale]/blog/page.tsx @@ -0,0 +1,51 @@ +import Link from 'next/link'; +import { getAllPosts } from '@/lib/blog'; +import { useTranslations } from 'next-intl'; + +interface BlogIndexProps { + params: { + locale: string; + }; +} + +export default async function BlogIndex({ params: { locale } }: BlogIndexProps) { + const posts = await getAllPosts(locale); + + return ( +
+

Blog

+ +
+ {posts.map((post) => ( + +
+ {post.frontmatter.featuredImage && ( +
+ {post.frontmatter.title} +
+ )} +
+
+ {new Date(post.frontmatter.date).toLocaleDateString(locale)} +
+

+ {post.frontmatter.title} +

+

+ {post.frontmatter.excerpt} +

+ + Read more → + +
+
+ + ))} +
+
+ ); +} diff --git a/app/[locale]/contact/page.tsx b/app/[locale]/contact/page.tsx new file mode 100644 index 00000000..55361e45 --- /dev/null +++ b/app/[locale]/contact/page.tsx @@ -0,0 +1,89 @@ +import { useTranslations } from 'next-intl'; +import { Section, Container, Button } from '@/components/ui'; + +export default function ContactPage() { + const t = useTranslations('Navigation'); // Reusing navigation translations for now + + return ( +
+
+ +
+

Get in Touch

+

+ Have questions about our products or need a custom solution? We're here to help. +

+
+ +
+ {/* Contact Info */} +
+
+

Contact Information

+
+

+ + + + + + Raiffeisenstraße 22
+ 73630 Remshalden
+ Germany +
+

+

+ + + + +49 881 92537298 +

+

+ + + + info@klz-vertriebs-gmbh.com +

+
+
+ +
+

Business Hours

+
    +
  • + Monday - Friday + 8:00 AM - 5:00 PM +
  • +
  • + Saturday - Sunday + Closed +
  • +
+
+
+ + {/* Contact Form Placeholder */} +
+

Send us a message

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+
+ ); +} diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx new file mode 100644 index 00000000..4cfdffe6 --- /dev/null +++ b/app/[locale]/layout.tsx @@ -0,0 +1,31 @@ +import {NextIntlClientProvider} from 'next-intl'; +import {getMessages} from 'next-intl/server'; +import '../../styles/globals.css'; +import Header from '@/components/Header'; +import Footer from '@/components/Footer'; + +export default async function LocaleLayout({ + children, + params: {locale} +}: { + children: React.ReactNode; + params: {locale: string}; +}) { + // Providing all messages to the client + // side is the easiest way to get started + const messages = await getMessages(); + + return ( + + + +
+
+ {children} +
+