udpate for coming soon
This commit is contained in:
@@ -1,19 +1,36 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { notFound } from "next/navigation";
|
||||
import { buildPageMetadata } from "@/lib/metadata";
|
||||
import { isComingSoonMode } from "@/lib/site";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
|
||||
export function generateMetadata({ params }: { params: { locale: string } }): Metadata {
|
||||
if (!isLocale(params.locale)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return buildPageMetadata(params.locale, "about");
|
||||
}
|
||||
|
||||
export default function AboutPage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
if (isComingSoonMode()) {
|
||||
redirect(`/${params.locale}`);
|
||||
}
|
||||
|
||||
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>
|
||||
<section className="panel section-stack">
|
||||
<div>
|
||||
<p className="eyebrow">{dictionary.about.kicker}</p>
|
||||
<h1>{dictionary.about.title}</h1>
|
||||
<p className="lead">{dictionary.about.story}</p>
|
||||
</div>
|
||||
|
||||
<div className="split-grid">
|
||||
<article className="card">
|
||||
@@ -34,6 +51,15 @@ export default function AboutPage({ params }: { params: { locale: string } }) {
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<article className="card">
|
||||
<h2>{dictionary.about.principlesTitle}</h2>
|
||||
<ul className="list">
|
||||
{dictionary.about.principles.map((item) => (
|
||||
<li key={item}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</article>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,28 +1,69 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { notFound } from "next/navigation";
|
||||
import { buildPageMetadata } from "@/lib/metadata";
|
||||
import { getContactChannels, isComingSoonMode } from "@/lib/site";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
|
||||
export function generateMetadata({ params }: { params: { locale: string } }): Metadata {
|
||||
if (!isLocale(params.locale)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return buildPageMetadata(params.locale, "contact");
|
||||
}
|
||||
|
||||
export default function ContactPage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
if (isComingSoonMode()) {
|
||||
redirect(`/${params.locale}`);
|
||||
}
|
||||
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
const channels = getContactChannels(dictionary.contact);
|
||||
|
||||
return (
|
||||
<section className="panel">
|
||||
<p className="eyebrow">{dictionary.contact.kicker}</p>
|
||||
<h1>{dictionary.contact.title}</h1>
|
||||
<p className="lead">{dictionary.contact.description}</p>
|
||||
<section className="panel section-stack">
|
||||
<div>
|
||||
<p className="eyebrow">{dictionary.contact.kicker}</p>
|
||||
<h1>{dictionary.contact.title}</h1>
|
||||
<p className="lead">{dictionary.contact.description}</p>
|
||||
</div>
|
||||
|
||||
<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 className="card availability-card">
|
||||
<h2>{dictionary.contact.availabilityTitle}</h2>
|
||||
<p>{dictionary.contact.availabilityDescription}</p>
|
||||
</article>
|
||||
|
||||
<div className="section-heading">
|
||||
<h2>{dictionary.contact.channelsTitle}</h2>
|
||||
</div>
|
||||
|
||||
<div className="split-grid contact-grid">
|
||||
{channels.map((channel) => (
|
||||
<article className="card contact-channel-card" key={channel.key}>
|
||||
<div className="channel-meta">
|
||||
<h3>{channel.name}</h3>
|
||||
<p>{channel.hint}</p>
|
||||
</div>
|
||||
<p className="contact-value">{channel.value}</p>
|
||||
{channel.href ? (
|
||||
<a
|
||||
href={channel.href}
|
||||
className="card-link"
|
||||
target={channel.external ? "_blank" : undefined}
|
||||
rel={channel.external ? "noreferrer" : undefined}
|
||||
>
|
||||
{dictionary.contact.channelCta}
|
||||
</a>
|
||||
) : (
|
||||
<span className="card-link is-disabled" aria-disabled="true">
|
||||
{dictionary.contact.channelFallback}
|
||||
</span>
|
||||
)}
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,8 @@ import SiteFooter from "@/components/SiteFooter";
|
||||
import SiteHeader from "@/components/SiteHeader";
|
||||
import { getDictionary, getDirection, isLocale, locales, type Locale } from "@/lib/i18n";
|
||||
|
||||
export const dynamicParams = false;
|
||||
|
||||
export function generateStaticParams() {
|
||||
return locales.map((locale) => ({ locale }));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
import type { Metadata } from "next";
|
||||
import HeroSection from "@/components/HeroSection";
|
||||
import { getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { buildPageMetadata } from "@/lib/metadata";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export function generateMetadata({ params }: { params: { locale: string } }): Metadata {
|
||||
if (!isLocale(params.locale)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return buildPageMetadata(params.locale, "home");
|
||||
}
|
||||
|
||||
export default function HomePage({ params }: { params: { locale: string } }) {
|
||||
if (!isLocale(params.locale)) {
|
||||
notFound();
|
||||
|
||||
Reference in New Issue
Block a user