first udpate
This commit is contained in:
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default function AboutPage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
|
||||
return (
|
||||
<section className="panel">
|
||||
<p className="eyebrow">{dictionary.about.kicker}</p>
|
||||
<h1>{dictionary.about.title}</h1>
|
||||
<p className="lead">{dictionary.about.story}</p>
|
||||
|
||||
<div className="split-grid">
|
||||
<article className="card">
|
||||
<h2>{dictionary.about.skillsTitle}</h2>
|
||||
<ul className="list">
|
||||
{dictionary.about.skills.map((skill) => (
|
||||
<li key={skill}>{skill}</li>
|
||||
))}
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<article className="card">
|
||||
<h2>{dictionary.about.experienceTitle}</h2>
|
||||
<ul className="list">
|
||||
{dictionary.about.experience.map((item) => (
|
||||
<li key={item}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default function ContactPage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
|
||||
return (
|
||||
<section className="panel">
|
||||
<p className="eyebrow">{dictionary.contact.kicker}</p>
|
||||
<h1>{dictionary.contact.title}</h1>
|
||||
<p className="lead">{dictionary.contact.description}</p>
|
||||
|
||||
<div className="split-grid">
|
||||
{dictionary.contact.channels.map((channel) => (
|
||||
<article className="card" key={channel.name}>
|
||||
<h2>{channel.name}</h2>
|
||||
<p>{channel.status}</p>
|
||||
<button type="button" className="pending-btn" disabled aria-disabled="true">
|
||||
{dictionary.contact.pendingCta}
|
||||
</button>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { notFound } from "next/navigation";
|
||||
import BottomNav from "@/components/BottomNav";
|
||||
import SiteFooter from "@/components/SiteFooter";
|
||||
import SiteHeader from "@/components/SiteHeader";
|
||||
import { getDictionary, getDirection, isLocale, locales, type Locale } from "@/lib/i18n";
|
||||
|
||||
export function generateStaticParams() {
|
||||
return locales.map((locale) => ({ locale }));
|
||||
}
|
||||
|
||||
export default function LocaleLayout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
params: { locale: string };
|
||||
}) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
|
||||
return (
|
||||
<div dir={getDirection(locale)} className="site-shell">
|
||||
<SiteHeader locale={locale} common={dictionary.common} />
|
||||
<main className="page-content">{children}</main>
|
||||
<BottomNav locale={locale} common={dictionary.common} />
|
||||
<SiteFooter locale={locale} common={dictionary.common} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import HeroSection from "@/components/HeroSection";
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default function HomePage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
|
||||
return <HeroSection locale={locale} home={dictionary.home} common={dictionary.common} />;
|
||||
}
|
||||
Reference in New Issue
Block a user