Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
✨ Add how it works section to the landing page (#3011)
Luke Vellaa80ff7010046
diff --git a/apps/landing/public/locales/en/common.json b/apps/landing/public/locales/en/common.jsonindex f563d2eb9..fad446196 100644--- a/apps/landing/public/locales/en/common.json+++ b/apps/landing/public/locales/en/common.json@@ -11,7 +11,6 @@"footerXLabel": "Follow us on X","getStarted": "Get started","goToHome": "Go to home",- "howItWorks": "How it works","language": "Language","licensingThankYouGoHomeLink": "Return to home","licensingThankYouLicense": "Next steps",diff --git a/apps/landing/public/locales/en/home.json b/apps/landing/public/locales/en/home.jsonindex e95256879..de9a69ebe 100644--- a/apps/landing/public/locales/en/home.json+++ b/apps/landing/public/locales/en/home.json@@ -61,6 +61,16 @@"heroDemoYes": "Yes","heroDemoYou": "You","hint": "It's free! No login required.",+ "howItWorksDescription": "Scheduling a group meeting takes three steps and less than a minute.",+ "howItWorksLearnMore": "Learn more",+ "howItWorksStep1Description": "Pick a few times that could work. Add a title and you're done. No account needed.",+ "howItWorksStep1Title": "Create a poll",+ "howItWorksStep2Description": "Send it over email, Slack, or WhatsApp. Participants don't need to sign up.",+ "howItWorksStep2Title": "Share the link",+ "howItWorksStep3Description": "Everyone marks the times that work for them, and the best option shows at a glance.",+ "howItWorksStep3Title": "Vote and decide",+ "howItWorksStepLabel": "Step {number}",+ "howItWorksTitle": "How it works","hubspotQuote": "“The simplest choice for availability polling for large groups.”","metaDescription": "Rallly is the fastest and easiest scheduling and collaboration tool. Create a meeting poll in seconds, no login required.","metaTitle": "Rallly: Free Group Meeting Scheduling Tool",diff --git a/apps/landing/src/app/[locale]/(main)/layout.tsx b/apps/landing/src/app/[locale]/(main)/layout.tsxindex d1e6eca19..5cc2c0121 100644--- a/apps/landing/src/app/[locale]/(main)/layout.tsx+++ b/apps/landing/src/app/[locale]/(main)/layout.tsx@@ -60,9 +60,6 @@ export default async function Root(props: {/></LinkBase><nav className="hidden items-center gap-2 lg:flex">- <NavLink href="https://support.rallly.co/workflow/create">- <Trans t={t} i18nKey="howItWorks" defaults="How it works" />- </NavLink><NavLink href="/pricing"><Trans t={t} i18nKey="pricing" /></NavLink>@@ -106,13 +103,6 @@ export default async function Root(props: {align="end"sideOffset={16}>- <DropdownMenuItem- render={- <LinkBase href="https://support.rallly.co/workflow/create" />- }- >- <Trans t={t} i18nKey="howItWorks" defaults="How it works" />- </DropdownMenuItem><DropdownMenuItem render={<LinkBase href="/pricing" />}><Trans t={t} i18nKey="pricing" defaults="Pricing" /></DropdownMenuItem>diff --git a/apps/landing/src/app/[locale]/(main)/page.tsx b/apps/landing/src/app/[locale]/(main)/page.tsxindex 2bd097d33..b092f36ed 100644--- a/apps/landing/src/app/[locale]/(main)/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/page.tsx@@ -10,6 +10,7 @@ import { Cta } from "@/components/home/cta";import { Faq, FaqItem } from "@/components/home/faq";import { Hero, HeroAnnouncement } from "@/components/home/hero";import { HeroDemo } from "@/components/home/hero-demo/hero-demo";+import { HowItWorks } from "@/components/home/how-it-works/how-it-works";import { Mention, Mentions } from "@/components/home/mentions";import { Stats } from "@/components/home/stats";import { Testimonial } from "@/components/home/testimonial";@@ -83,6 +84,7 @@ export default async function Page(props: {/></Stats></Section>+ <HowItWorks locale={locale} /><Section><Testimoniallogo={diff --git a/apps/landing/src/components/home/how-it-works/create-step-demo.tsx b/apps/landing/src/components/home/how-it-works/create-step-demo.tsxnew file mode 100644index 000000000..eb8f9a796--- /dev/null+++ b/apps/landing/src/components/home/how-it-works/create-step-demo.tsx@@ -0,0 +1,61 @@+import { cn } from "@rallly/ui";+import { DemoScreen } from "../hero-demo/demo-frame";++// A textless mock of the poll creation form: title field and a month+// calendar with a weekly cadence of selected days. Bars stand in for copy so+// it doesn't compete with the section text. Sized to fit the 4:3 artboard on+// the how it works section.+const WEEKS = 4;+const START_OFFSET = 2;+const SELECTED_COLUMN = 3;++export const CreateStepDemo = () => (+ <DemoScreen className="space-y-2 p-4">+ <div className="space-y-1.5">+ <div className="h-1.5 w-8 rounded-full bg-gray-300" />+ <div className="flex h-6 items-center rounded-md border border-gray-200 px-2">+ <div className="h-1.5 w-24 rounded-full bg-gray-300" />+ </div>+ </div>+ <div className="space-y-1.5">+ <div className="flex items-center justify-between">+ <div className="h-1.5 w-14 rounded-full bg-gray-300" />+ <div className="h-1.5 w-10 rounded-full bg-gray-200" />+ </div>+ <div className="grid grid-cols-7 gap-1">+ {Array.from({ length: 7 }, (_, index) => (+ <div+ // biome-ignore lint/suspicious/noArrayIndexKey: weekday header cells are positional+ key={index}+ className="flex justify-center py-0.5"+ >+ <div className="h-1 w-2 rounded-full bg-gray-200" />+ </div>+ ))}+ {Array.from({ length: WEEKS * 7 }, (_, index) => {+ if (index < START_OFFSET) {+ return (+ <div+ // biome-ignore lint/suspicious/noArrayIndexKey: calendar cells are positional+ key={index}+ />+ );+ }+ return (+ <div+ // biome-ignore lint/suspicious/noArrayIndexKey: calendar cells are positional+ key={index}+ className={cn(+ "h-3.5 rounded",+ index % 7 === SELECTED_COLUMN ? "bg-gray-300" : "bg-gray-100",+ )}+ />+ );+ })}+ </div>+ </div>+ <div className="flex justify-end border-gray-200/60 border-t pt-2">+ <div className="h-7 w-14 rounded-md bg-indigo-600/90" />+ </div>+ </DemoScreen>+);diff --git a/apps/landing/src/components/home/how-it-works/decide-step-demo.tsx b/apps/landing/src/components/home/how-it-works/decide-step-demo.tsxnew file mode 100644index 000000000..9b92ec140--- /dev/null+++ b/apps/landing/src/components/home/how-it-works/decide-step-demo.tsx@@ -0,0 +1,54 @@+import { cn } from "@rallly/ui";+import { VoteIcon } from "@rallly/ui/vote-icon";+import { DemoScreen } from "../hero-demo/demo-frame";++// A textless mock of the results: one row per option with real vote icons,+// the winner highlighted. Bars stand in for copy so it doesn't compete with+// the section text. Sized to fit the 4:3 artboard on the how it works+// section.+const ROWS: { votes: ("yes" | "ifNeedBe" | "no")[]; winner: boolean }[] = [+ { votes: ["yes", "yes", "yes", "yes"], winner: true },+ { votes: ["yes", "no", "yes", "no"], winner: false },+ { votes: ["yes", "ifNeedBe", "yes", "no"], winner: false },+ { votes: ["no", "yes", "ifNeedBe", "no"], winner: false },+];++export const DecideStepDemo = () => (+ <DemoScreen className="space-y-1.5 p-4">+ {ROWS.map((row, rowIndex) => (+ <div+ // biome-ignore lint/suspicious/noArrayIndexKey: static wireframe rows+ key={rowIndex}+ className={cn(+ "flex items-center justify-between gap-3 rounded-md border px-2.5 py-2",+ row.winner ? "border-indigo-200 bg-indigo-50" : "border-gray-200",+ )}+ >+ <div className="min-w-0 space-y-1.5">+ <div+ className={cn(+ "h-1.5 w-16 rounded-full",+ row.winner ? "bg-indigo-400" : "bg-gray-300",+ )}+ />+ <div className="flex items-center gap-2">+ <div className="h-1.5 w-10 rounded-full bg-gray-200" />+ {row.winner ? (+ <div className="h-1.5 w-12 rounded-full bg-indigo-600" />+ ) : null}+ </div>+ </div>+ <div className="flex shrink-0 items-center gap-1">+ {row.votes.map((vote, voteIndex) => (+ <VoteIcon+ // biome-ignore lint/suspicious/noArrayIndexKey: static wireframe votes+ key={voteIndex}+ type={vote}+ className="size-3.5"+ />+ ))}+ </div>+ </div>+ ))}+ </DemoScreen>+);diff --git a/apps/landing/src/components/home/how-it-works/how-it-works.tsx b/apps/landing/src/components/home/how-it-works/how-it-works.tsxnew file mode 100644index 000000000..628ebba46--- /dev/null+++ b/apps/landing/src/components/home/how-it-works/how-it-works.tsx@@ -0,0 +1,151 @@+import { ArrowRightIcon } from "lucide-react";+import { Trans } from "react-i18next/TransWithoutContext";+import {+ Section,+ SectionContent,+ SectionDescription,+ SectionHeading,+ SectionTitle,+} from "@/components/section";+import { getTranslation } from "@/i18n/server";+import { CreateStepDemo } from "./create-step-demo";+import { DecideStepDemo } from "./decide-step-demo";+import { ShareStepDemo } from "./share-step-demo";++// The meeting poll walkthrough, shared by the home page and the SEO landing+// pages. Owns its copy, unlike the rest of the landing components, so every+// page renders the same three steps.+export const HowItWorks = async ({ locale }: { locale: string }) => {+ const { t } = await getTranslation<"home">(locale, "home");+ const steps = [+ {+ key: "create",+ title: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep1Title"+ defaults="Create a poll"+ />+ ),+ description: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep1Description"+ defaults="Pick a few times that could work. Add a title and you're done. No account needed."+ />+ ),+ visual: <CreateStepDemo />,+ },+ {+ key: "share",+ title: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep2Title"+ defaults="Share the link"+ />+ ),+ description: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep2Description"+ defaults="Send it over email, Slack, or WhatsApp. Participants don't need to sign up."+ />+ ),+ visual: <ShareStepDemo />,+ },+ {+ key: "decide",+ title: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep3Title"+ defaults="Vote and decide"+ />+ ),+ description: (+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStep3Description"+ defaults="Everyone marks the times that work for them, and the best option shows at a glance."+ />+ ),+ visual: <DecideStepDemo />,+ },+ ];++ return (+ <Section id="how-it-works" className="scroll-mt-20">+ <SectionHeading>+ <SectionTitle>+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksTitle"+ defaults="How it works"+ />+ </SectionTitle>+ <SectionDescription>+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksDescription"+ defaults="Scheduling a group meeting takes three steps and less than a minute."+ />+ </SectionDescription>+ <a+ className="inline-flex items-center gap-1.5 font-medium text-gray-800 text-sm hover:text-gray-600"+ href="https://support.rallly.co/workflow/create"+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksLearnMore"+ defaults="Learn more"+ />+ <ArrowRightIcon className="size-4" />+ </a>+ </SectionHeading>+ <SectionContent>+ <dl className="grid gap-x-4 gap-y-4 lg:grid-cols-3 lg:grid-rows-[auto_auto] lg:gap-y-1">+ {steps.map((step, index) => (+ <div+ key={step.key}+ className="flex flex-col gap-1 rounded-2xl border bg-white p-1 lg:row-span-2 lg:grid lg:grid-rows-subgrid"+ >+ <div className="space-y-4 rounded-xl border bg-gray-100 p-4">+ <div className="font-mono text-gray-400 text-xs uppercase tracking-wide">+ <Trans+ t={t}+ ns="home"+ i18nKey="howItWorksStepLabel"+ defaults="Step {number}"+ values={{ number: `0${index + 1}` }}+ />+ </div>+ <div+ aria-hidden="true"+ className="flex h-64 items-center justify-center"+ >+ <div className="w-full max-w-64">{step.visual}</div>+ </div>+ </div>+ <div className="p-3">+ <dt className="font-medium text-gray-900">{step.title}</dt>+ <dd className="mt-2 text-pretty text-base/6 text-gray-500 sm:text-sm/5">+ {step.description}+ </dd>+ </div>+ </div>+ ))}+ </dl>+ </SectionContent>+ </Section>+ );+};diff --git a/apps/landing/src/components/home/how-it-works/share-step-demo.tsx b/apps/landing/src/components/home/how-it-works/share-step-demo.tsxnew file mode 100644index 000000000..536f0a4e0--- /dev/null+++ b/apps/landing/src/components/home/how-it-works/share-step-demo.tsx@@ -0,0 +1,56 @@+import { cn } from "@rallly/ui";+import { MailIcon, MessageCircleIcon, SendIcon } from "lucide-react";+import { DemoScreen } from "../hero-demo/demo-frame";++// A textless mock of the invite step: a link field with a copy button, ways+// to send it, and the group it goes out to. Bars stand in for copy so it+// doesn't compete with the section text. Fills the 4:3 frame on the how it+// works section.+const CHANNELS = [+ { key: "email", icon: MailIcon, width: "w-20" },+ { key: "chat", icon: MessageCircleIcon, width: "w-14" },+ { key: "direct", icon: SendIcon, width: "w-24" },+];++export const ShareStepDemo = () => (+ <DemoScreen className="space-y-2 p-4">+ <div className="space-y-1.5">+ <div className="h-1.5 w-12 rounded-full bg-gray-300" />+ <div className="flex items-center gap-2">+ <div className="flex h-7 min-w-0 flex-1 items-center gap-1.5 rounded-md border border-gray-200 bg-gray-50 px-2">+ <div className="h-1.5 w-28 rounded-full bg-gray-300" />+ </div>+ <div className="h-7 w-14 shrink-0 rounded-md bg-indigo-600/90" />+ </div>+ </div>+ <div className="space-y-1.5">+ {CHANNELS.map((channel) => (+ <div+ key={channel.key}+ className="flex items-center gap-2 rounded-md border border-gray-200 px-2 py-1.5"+ >+ <div className="flex size-5 shrink-0 items-center justify-center rounded bg-gray-100">+ <channel.icon className="size-3 text-gray-400" />+ </div>+ <div+ className={cn("h-1.5 rounded-full bg-gray-300", channel.width)}+ />+ </div>+ ))}+ </div>+ <div className="flex items-center gap-3 border-gray-200/60 border-t pt-3">+ <div className="flex shrink-0 -space-x-1.5">+ {[0, 1, 2, 3].map((participant) => (+ <div+ key={participant}+ className="size-6 rounded-full bg-gray-300 ring-2 ring-white"+ />+ ))}+ </div>+ <div className="min-w-0 flex-1 space-y-1.5">+ <div className="h-1.5 max-w-32 rounded-full bg-gray-200" />+ <div className="h-1.5 max-w-20 rounded-full bg-gray-200" />+ </div>+ </div>+ </DemoScreen>+);