feat(i18n): setup next-intl core config and translation dictionaries
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { AboutContent } from "@/components/about-content";
|
||||
import { PersonJsonLd } from "@/components/json-ld";
|
||||
|
||||
export default function AboutPage() {
|
||||
return (
|
||||
<>
|
||||
<PersonJsonLd
|
||||
name="Poyraz Avsever"
|
||||
jobTitle="Fullstack Developer"
|
||||
sameAs={[
|
||||
"https://github.com/poyrazavsever",
|
||||
"https://www.linkedin.com/in/poyrazavsever",
|
||||
"https://x.com/poyrazavsever",
|
||||
]}
|
||||
/>
|
||||
<AboutContent />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ReferencesDetailContent } from "@/components/references-detail-content";
|
||||
|
||||
export default function AboutReferencesPage() {
|
||||
return <ReferencesDetailContent />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { VolunteerCommunityContent } from "@/components/volunteer-community-content";
|
||||
|
||||
export default function AboutVolunteerCommunityPage() {
|
||||
return <VolunteerCommunityContent />;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { Metadata } from "next";
|
||||
import { BlogDetailContent } from "@/components/blog-detail-content";
|
||||
import { ArticleJsonLd } from "@/components/json-ld";
|
||||
import { getBlogDetailBySlug } from "@/data/blog-detail";
|
||||
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com";
|
||||
|
||||
type BlogDetailPageProps = {
|
||||
params: Promise<{ slug: string }>;
|
||||
};
|
||||
|
||||
export async function generateMetadata({ params }: BlogDetailPageProps): Promise<Metadata> {
|
||||
const { slug } = await params;
|
||||
const post = await getBlogDetailBySlug(slug);
|
||||
|
||||
if (!post) {
|
||||
return {
|
||||
title: "Yazı Bulunamadı",
|
||||
};
|
||||
}
|
||||
|
||||
const url = `${SITE_URL}/blog/${post.slug}`;
|
||||
|
||||
return {
|
||||
title: post.title,
|
||||
description: post.excerpt,
|
||||
openGraph: {
|
||||
title: post.title,
|
||||
description: post.excerpt,
|
||||
url,
|
||||
type: "article",
|
||||
publishedTime: post.date,
|
||||
authors: [post.author],
|
||||
images: [
|
||||
{
|
||||
url: post.coverImage,
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: post.title,
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: post.title,
|
||||
description: post.excerpt,
|
||||
images: [post.coverImage],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
|
||||
const { slug } = await params;
|
||||
const post = await getBlogDetailBySlug(slug);
|
||||
|
||||
if (!post) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<ArticleJsonLd
|
||||
title={post.title}
|
||||
description={post.excerpt}
|
||||
url={`${SITE_URL}/blog/${post.slug}`}
|
||||
image={post.coverImage}
|
||||
datePublished={post.date}
|
||||
authorName={post.author}
|
||||
/>
|
||||
<BlogDetailContent post={post} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { BlogContent } from "@/components/blog-content";
|
||||
import { getBlogPageData } from "@/data/blog";
|
||||
|
||||
type BlogPageProps = {
|
||||
searchParams?: Promise<{ page?: string | string[]; category?: string | string[]; search?: string | string[] }>;
|
||||
};
|
||||
|
||||
export default async function BlogPage({ searchParams }: BlogPageProps) {
|
||||
const resolved = searchParams ? await searchParams : undefined;
|
||||
const pageParam = Array.isArray(resolved?.page) ? resolved?.page[0] : resolved?.page;
|
||||
const categoryParam = Array.isArray(resolved?.category)
|
||||
? resolved?.category[0]
|
||||
: resolved?.category;
|
||||
const searchParam = Array.isArray(resolved?.search) ? resolved?.search[0] : resolved?.search;
|
||||
const page = Number(pageParam ?? "1");
|
||||
const currentPage = Number.isFinite(page) && page > 0 ? Math.floor(page) : 1;
|
||||
const data = await getBlogPageData(currentPage, 12, categoryParam, searchParam);
|
||||
|
||||
return <BlogContent data={data} />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ContactContent } from "@/components/contact-content";
|
||||
|
||||
export default function ContactPage() {
|
||||
return <ContactContent />;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { ContentContent } from "@/components/content-content";
|
||||
import { YOUTUBE_VIDEO_LINKS } from "@/data/youtube-videos";
|
||||
import { getPdfNotes } from "@/lib/content-page";
|
||||
|
||||
export default async function ContentPage() {
|
||||
const pdfFiles = await getPdfNotes();
|
||||
|
||||
return (
|
||||
<ContentContent
|
||||
youtubeLinks={YOUTUBE_VIDEO_LINKS}
|
||||
pdfFiles={pdfFiles}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { GalleryContent } from "@/components/gallery-content";
|
||||
import { GALLERY_IMAGES } from "@/data/gallery";
|
||||
import type { Metadata } from "next";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Galeri",
|
||||
description: "Poyraz Avsever'in tasarımları, projeleri ve görsel içeriklerinden oluşan galeri portföyü.",
|
||||
};
|
||||
|
||||
export default function GalleryPage() {
|
||||
return <GalleryContent images={GALLERY_IMAGES} />;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Metadata } from "next";
|
||||
import { LinksContent } from "@/components/links-content";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Links",
|
||||
description:
|
||||
"Poyraz Avsever'in sosyal medya, portfolyo ve içerik bağlantılarına tek sayfadan ulaş.",
|
||||
alternates: {
|
||||
canonical: "/links",
|
||||
},
|
||||
openGraph: {
|
||||
title: "Poyraz Avsever | Links",
|
||||
description:
|
||||
"Poyraz Avsever'in sosyal medya, portfolyo ve içerik bağlantılarına tek sayfadan ulaş.",
|
||||
url: "https://poyrazavsever.com/links",
|
||||
images: [
|
||||
{
|
||||
url: "/logo/cover.png",
|
||||
width: 1536,
|
||||
height: 512,
|
||||
alt: "Poyraz Avsever Links sayfası kapak görseli",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: "Poyraz Avsever | Links",
|
||||
description:
|
||||
"Poyraz Avsever'in sosyal medya, portfolyo ve içerik bağlantılarına tek sayfadan ulaş.",
|
||||
images: ["/logo/cover.png"],
|
||||
},
|
||||
};
|
||||
|
||||
export default function LinksPage() {
|
||||
return <LinksContent />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { PageSkeleton } from "@/components/page-skeleton";
|
||||
|
||||
export default function Loading() {
|
||||
return <PageSkeleton />;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { HomeHero } from "@/components/home-hero";
|
||||
import { HomeVideosSection } from "@/components/home-videos-section";
|
||||
import { ReferencesSection } from "@/components/references-section";
|
||||
import { SponsorsSection } from "@/components/sponsors-section";
|
||||
import { getHomeBlogNews } from "@/data/blog";
|
||||
|
||||
export default async function Home() {
|
||||
const homeNews = await getHomeBlogNews(3);
|
||||
|
||||
return (
|
||||
<section className="flex h-full flex-col gap-4 overflow-y-auto overflow-x-hidden">
|
||||
<HomeHero news={homeNews} />
|
||||
<ReferencesSection />
|
||||
<HomeVideosSection />
|
||||
<SponsorsSection />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ProjectsContent } from "@/components/projects-content";
|
||||
|
||||
export default function ProjectsPage() {
|
||||
return <ProjectsContent />;
|
||||
}
|
||||
Reference in New Issue
Block a user