feat(landing): секции по DESIGN.md
Шрифты Golos Text и Martian Mono через next/font, токены @theme, все блоки по плану: первый экран со штампом даты ближайшей обжарки, лента недели, этикетки сортов, подписка, кто мы, доставка, форма, подвал. Три фото Unsplash локально, priority только у первого экрана. LeadForm перекрашена под токены, логика и data-атрибуты те же. В site.ts и form.ts добавлены служебные подписи для вёрстки.
This commit is contained in:
@@ -1,31 +1,33 @@
|
||||
// Заглушка страницы: проверяем форму и CTA. Секции и вёрстку сделает дизайнер.
|
||||
import { CtaButton } from '@/components/CtaButton';
|
||||
import { LeadForm } from '@/components/LeadForm';
|
||||
import { CTAS, FORM_TEXT } from '@/content/form';
|
||||
import { LEAD_SECTION_ID } from '@/lib/leadPrefill';
|
||||
import { About } from '@/components/sections/About';
|
||||
import { Catalog } from '@/components/sections/Catalog';
|
||||
import { Delivery } from '@/components/sections/Delivery';
|
||||
import { Footer } from '@/components/sections/Footer';
|
||||
import { Freshness } from '@/components/sections/Freshness';
|
||||
import { Header } from '@/components/sections/Header';
|
||||
import { Hero } from '@/components/sections/Hero';
|
||||
import { LeadSection } from '@/components/sections/LeadSection';
|
||||
import { Subscription } from '@/components/sections/Subscription';
|
||||
import { formatShortDate, getRoastWeek } from '@/lib/roastWeek';
|
||||
|
||||
const ctaClass = 'rounded border border-neutral-900 px-4 py-2';
|
||||
// дата ближайшей обжарки пересчитывается раз в час
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default function Page() {
|
||||
const week = getRoastWeek();
|
||||
const roastDate = formatShortDate(week.roast);
|
||||
return (
|
||||
<main className="mx-auto flex max-w-2xl flex-col gap-12 px-4 py-10 font-sans">
|
||||
<section id="hero" className="flex flex-col gap-4">
|
||||
<h1 className="text-3xl font-bold">Кварта — свежая обжарка в Минске</h1>
|
||||
<p>Обжариваем по четвергам, привозим по пятницам.</p>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
{Object.values(CTAS).map((cta) => (
|
||||
<CtaButton key={cta.label} interest={cta.interest} comment={'comment' in cta ? cta.comment : undefined} className={ctaClass}>
|
||||
{cta.label}
|
||||
</CtaButton>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id={LEAD_SECTION_ID} className="flex scroll-mt-4 flex-col gap-4">
|
||||
<h2 className="text-2xl font-bold">{FORM_TEXT.title}</h2>
|
||||
<p>{FORM_TEXT.lead}</p>
|
||||
<LeadForm />
|
||||
</section>
|
||||
</main>
|
||||
<>
|
||||
<Header />
|
||||
<main id="top">
|
||||
<Hero roastDate={roastDate} />
|
||||
<Freshness week={week} />
|
||||
<Catalog roastDate={roastDate} />
|
||||
<Subscription />
|
||||
<About />
|
||||
<Delivery />
|
||||
<LeadSection />
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user