Fix Coming soon
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import type { HomeVariantContent } from "@/content/types";
|
||||
import { getEmailHref } from "@/lib/site";
|
||||
|
||||
type ComingSoonPanelProps = {
|
||||
content: HomeVariantContent;
|
||||
};
|
||||
|
||||
export default function ComingSoonPanel({ content }: ComingSoonPanelProps) {
|
||||
const emailHref = getEmailHref();
|
||||
|
||||
return (
|
||||
<section className="coming-soon panel">
|
||||
<div className="coming-soon-copy">
|
||||
<p className="availability-badge">{content.badge}</p>
|
||||
<p className="eyebrow">{content.kicker}</p>
|
||||
<h1>{content.title}</h1>
|
||||
<p className="lead">{content.description}</p>
|
||||
|
||||
<div className="cta-row">
|
||||
{emailHref ? (
|
||||
<a href={emailHref} className="cta-btn">
|
||||
{content.primaryCta}
|
||||
</a>
|
||||
) : (
|
||||
<span className="cta-btn is-disabled" aria-disabled="true">
|
||||
{content.primaryCta}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="coming-soon-meta" aria-label="Launch status">
|
||||
{content.highlights.map((item) => (
|
||||
<article key={item.label} className="coming-soon-card">
|
||||
<span className="coming-soon-value">{item.value}</span>
|
||||
<span className="coming-soon-label">{item.label}</span>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import ComingSoonPanel from "@/components/ComingSoonPanel";
|
||||
import type { HomeContent, HomeVariantContent } from "@/content/types";
|
||||
import type { Locale } from "@/lib/i18n";
|
||||
import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site";
|
||||
@@ -10,8 +11,13 @@ type HeroSectionProps = {
|
||||
|
||||
export default function HeroSection({ locale, home }: HeroSectionProps) {
|
||||
const activeHome: HomeVariantContent = getModeValue(home);
|
||||
const comingSoon = isComingSoonMode();
|
||||
const emailHref = getEmailHref();
|
||||
|
||||
if (comingSoon) {
|
||||
return <ComingSoonPanel content={activeHome} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="hero panel">
|
||||
<p className="availability-badge">{activeHome.badge}</p>
|
||||
@@ -29,7 +35,7 @@ export default function HeroSection({ locale, home }: HeroSectionProps) {
|
||||
{activeHome.primaryCta}
|
||||
</span>
|
||||
)}
|
||||
<Link href={isComingSoonMode() ? `/${locale}` : `/${locale}/about`} className="ghost-btn">
|
||||
<Link href={`/${locale}/about`} className="ghost-btn">
|
||||
{activeHome.secondaryCta}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Locale } from "@/lib/i18n";
|
||||
import type { CommonContent } from "@/content/types";
|
||||
import { getModeValue } from "@/lib/site";
|
||||
import { getModeValue, isComingSoonMode } from "@/lib/site";
|
||||
|
||||
type SiteFooterProps = {
|
||||
locale: Locale;
|
||||
@@ -10,6 +10,7 @@ type SiteFooterProps = {
|
||||
export default function SiteFooter({ locale, common }: SiteFooterProps) {
|
||||
const year = new Date().getFullYear();
|
||||
const commonVariant = getModeValue(common.variants);
|
||||
const isComingSoon = isComingSoonMode();
|
||||
|
||||
return (
|
||||
<footer className="site-footer">
|
||||
@@ -18,7 +19,7 @@ export default function SiteFooter({ locale, common }: SiteFooterProps) {
|
||||
<p>{common.footerRights.replace("{year}", String(year))}</p>
|
||||
<p>{commonVariant.footerBuiltWith}</p>
|
||||
</div>
|
||||
<p className="locale-badge">{locale.toUpperCase()}</p>
|
||||
{!isComingSoon ? <p className="locale-badge">{locale.toUpperCase()}</p> : null}
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function SiteHeader({ locale, common }: SiteHeaderProps) {
|
||||
) : null}
|
||||
|
||||
<div className="header-actions">
|
||||
<LanguageSwitcher locale={locale} label={common.languageSwitcherLabel} />
|
||||
{!isComingSoon ? <LanguageSwitcher locale={locale} label={common.languageSwitcherLabel} /> : null}
|
||||
<ThemeToggle
|
||||
label={common.themeToggleLabel}
|
||||
lightLabel={common.themeLight}
|
||||
|
||||
Reference in New Issue
Block a user