Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
✨ Add scheduling for executive assistants landing page (#3034)
Luke Vellad44b5622db91
diff --git a/apps/landing/public/locales/en/common.json b/apps/landing/public/locales/en/common.jsonindex 7607afbfc..72ea33f2d 100644--- a/apps/landing/public/locales/en/common.json+++ b/apps/landing/public/locales/en/common.json@@ -5,6 +5,7 @@"cookiePolicy": "Cookie policy","discussions": "Discussions","doodleAlternative": "Doodle alternative",+ "executiveAssistants": "Executive assistants","footerDiscordLabel": "Join us on Discord","footerGithubLabel": "View our GitHub repository","footerLinkedinLabel": "Follow us on LinkedIn",@@ -29,6 +30,7 @@"privacyPolicy": "Privacy policy","product": "Product","resources": "Resources",+ "schedulingFor": "Scheduling for","schedulingPoll": "Scheduling poll","status": "Status","support": "Support",diff --git a/apps/landing/public/locales/en/home.json b/apps/landing/public/locales/en/home.jsonindex de9a69ebe..9235bcf4b 100644--- a/apps/landing/public/locales/en/home.json+++ b/apps/landing/public/locales/en/home.json@@ -6,6 +6,22 @@"doodleAlternativeFinalCtaTitle": "Ready to make the switch?","doodleAlternativeMetaDescription": "Looking for a Doodle alternative? Try Rallly! It's free, easy to use, and doesn't require an account.","doodleAlternativeMetaTitle": "Best Free Doodle Alternative | Rallly",+ "eaDescription": "Find a time that works across a dozen busy calendars without a single follow-up email. Share one link, watch the responses land, and lock in the slot everyone can make. Free, and nobody you invite needs an account.",+ "eaFaqBranding": "Can polls carry our company branding?",+ "eaFaqBrandingAnswer": "With <0>Rallly Pro</0> you can add your own logo and colours and remove Rallly attribution, so a poll you send to a board or a client looks like it came from your organization. Everything else is free to use.",+ "eaFaqChasing": "Do I still have to chase people for replies?",+ "eaFaqChasingAnswer": "You can see at a glance who has responded and who hasn't, and get an email as responses come in. That turns the usual round of follow-up emails into a single reminder to the few people still outstanding.",+ "eaFaqExternalGuests": "Can I invite people outside my organization?",+ "eaFaqExternalGuestsAnswer": "Yes. Anyone with the link can respond, whether or not they use Rallly and whichever calendar system their company runs on. They don't need an account and there is no limit on how many people you invite, so board members, clients and external counsel can all reply the same way.",+ "eaFaqOnBehalf": "Can I schedule on behalf of an executive?",+ "eaFaqOnBehalfAnswer": "Yes. You create and manage the poll, so the responses come back to you and you decide the final time. You can also add participants and fill in availability on someone's behalf, which is useful when a principal sends you their times directly instead of clicking the link.",+ "eaFaqTimeZones": "Does it handle meetings across time zones?",+ "eaFaqTimeZonesAnswer": "Yes. Each participant sees the proposed times in their own time zone automatically, so a London board member and a San Francisco executive are looking at the same slot without either of you converting anything by hand.",+ "eaFinalCtaDescription": "Set up your poll in under a minute, send one link, and stop chasing replies.",+ "eaFinalCtaTitle": "Ready to get that meeting in the diary?",+ "eaMetaDescription": "Rallly is a free scheduling tool for executive assistants. Coordinate meetings across busy calendars and time zones with one link. No account needed to respond.",+ "eaMetaTitle": "Scheduling for Executive Assistants | Free Meeting Poll Tool",+ "eaTitle": "Scheduling for executive assistants","ericJobTitle": "Executive Assistant at MIT","ericQuote": "“If your scheduling workflow lives in emails, I strongly encourage you to try and let Rallly simplify your scheduling tasks for a more organized and less stressful workday.”","faqAfterVoting": "What happens after everyone votes?",@@ -46,11 +62,14 @@"heroDemoCreatePoll": "Create your own poll","heroDemoDecline": "Decline","heroDemoDescription": "Please pick every time you could attend. We'll go with the one that works for everyone.",+ "heroDemoEaDescription": "Please mark every slot you could make this week. The candidate is flying in on Monday, so I'd like to confirm as early as I can.",+ "heroDemoEaLocation": "Meeting room 3 and Zoom",+ "heroDemoEaOrganizer": "Organized by Sofia Almeida","heroDemoEasyDescription": "That's all it takes to respond to a poll.",+ "heroDemoEaTitle": "Interview panel: Head of Finance","heroDemoIfNeedBe": "If need be","heroDemoLocation": "Riverside Community Center","heroDemoNo": "No",- "heroDemoOptionCount": "{count, plural, one {# option} other {# options}}","heroDemoOrganizer": "Organized by Sofia Almeida","heroDemoParticipants": "Participants","heroDemoResponseOptions": "Response options",diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsxindex 4949e5257..aa77851c6 100644--- a/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx@@ -8,7 +8,7 @@ import { Trans } from "react-i18next/TransWithoutContext";import { PeopleBadge, PollsBadge } from "@/components/home/animated-number";import { Cta } from "@/components/home/cta";import { Faq, FaqItem } from "@/components/home/faq";-import { Hero, HeroAnnouncement } from "@/components/home/hero";+import { Hero } 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";@@ -44,26 +44,6 @@ export default async function Page(props: {description={t("doodleAlternativeDescription", {ns: "home",})}- announcement={- <HeroAnnouncement- href="/blog/mobile-voting-redesign"- badge={- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlogBadge"- defaults="New"- />- }- >- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlog"- defaults="A clearer way to vote on your phone"- />- </HeroAnnouncement>- }><HeroDemo locale={locale} /></Hero>diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsxindex 77f89fb11..57b0c6e32 100644--- a/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx@@ -8,7 +8,7 @@ import { Trans } from "react-i18next/TransWithoutContext";import { PeopleBadge, PollsBadge } from "@/components/home/animated-number";import { Cta } from "@/components/home/cta";import { Faq, FaqItem } from "@/components/home/faq";-import { Hero, HeroAnnouncement } from "@/components/home/hero";+import { Hero } 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";@@ -44,26 +44,6 @@ export default async function Page(props: {description={t("freeSchedulingPollDescription", {ns: "home",})}- announcement={- <HeroAnnouncement- href="/blog/mobile-voting-redesign"- badge={- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlogBadge"- defaults="New"- />- }- >- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlog"- defaults="A clearer way to vote on your phone"- />- </HeroAnnouncement>- }><HeroDemo locale={locale} /></Hero>diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsxnew file mode 100644index 000000000..77ae04c37--- /dev/null+++ b/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx@@ -0,0 +1,389 @@+"use cache";++import type { Metadata } from "next";+import { cacheLife } from "next/cache";+import Image from "next/image";+import Link from "next/link";+import { Trans } from "react-i18next/TransWithoutContext";+import { PeopleBadge, PollsBadge } from "@/components/home/animated-number";+import { Cta } from "@/components/home/cta";+import { Faq, FaqItem } from "@/components/home/faq";+import { Hero } 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";+import {+ Section,+ SectionContent,+ SectionDescription,+ SectionHeading,+ SectionTitle,+} from "@/components/section";+import { getTranslation } from "@/i18n/server";+import { getMonthlyPollCount, getMonthlyVoterCount } from "@/lib/data";++export default async function Page(props: {+ params: Promise<{ locale: string }>;+}) {+ cacheLife("days");+ const { locale } = await props.params;+ const { t } = await getTranslation(locale, ["home"]);+ const [pollCount, voterCount] = await Promise.all([+ getMonthlyPollCount(),+ getMonthlyVoterCount(),+ ]);+ return (+ <div className="divide-y">+ <Section>+ <Hero+ title={t("eaTitle", {+ ns: "home",+ defaultValue: "Scheduling for executive assistants",+ })}+ description={t("eaDescription", {+ ns: "home",+ defaultValue:+ "Find a time that works across a dozen busy calendars without a single follow-up email. Share one link, watch the responses land, and lock in the slot everyone can make. Free, and nobody you invite needs an account.",+ })}+ >+ <HeroDemo locale={locale} preset="executiveAssistant" />+ </Hero>+ <Stats className="mt-8 sm:mt-24">+ <Trans+ t={t}+ ns="home"+ i18nKey="statsLast30Days"+ defaults="<0>{voterCount, plural, one {# person} other {# people}}</0> voted on <1>{pollCount, plural, one {# poll} other {# polls}}</1> in the last 30 days"+ values={{ voterCount, pollCount }}+ components={[+ <PeopleBadge key="people" locale={locale} />,+ <PollsBadge key="polls" locale={locale} />,+ ]}+ />+ </Stats>+ </Section>+ <HowItWorks locale={locale} />+ <Section>+ <Testimonial+ logo={+ <Image+ src="/static/images/mit-logo.svg"+ width={54}+ height={28}+ alt=""+ />+ }+ avatar={+ <Image+ className="rounded-full"+ src="/static/images/eric.png"+ width={48}+ height={48}+ alt=""+ />+ }+ name="Eric Fletcher"+ title={+ <Trans+ t={t}+ ns="home"+ i18nKey="ericJobTitle"+ defaults="Executive Assistant at MIT"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="ericQuote"+ defaults="“If your scheduling workflow lives in emails, I strongly encourage you to try and let Rallly simplify your scheduling tasks for a more organized and less stressful workday.”"+ />+ </Testimonial>+ </Section>+ <Section>+ <Mentions>+ <Mention+ delay={0.25}+ logo={+ <div className="relative h-8 w-14">+ <Image+ src="/static/images/pcmag-logo.svg"+ alt="PCMag"+ fill+ style={{ objectFit: "contain" }}+ />+ </div>+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="pcmagQuote"+ defaults="“Set up a scheduling poll in as little time as possible.”"+ />+ </Mention>+ <Mention+ delay={0.5}+ logo={+ <div className="relative h-8 w-24">+ <Image+ src="/static/images/hubspot-logo.svg"+ alt="HubSpot"+ fill+ style={{ objectFit: "contain" }}+ />+ </div>+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="hubspotQuote"+ defaults="“The simplest choice for availability polling for large groups.”"+ />+ </Mention>+ <Mention+ delay={0.75}+ logo={+ <div className="relative h-8 w-32">+ <Image+ src="/static/images/goodfirms-logo.svg"+ alt="Goodfirms"+ fill+ style={{ objectFit: "contain" }}+ />+ </div>+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="goodfirmsQuote"+ defaults="“Unique in its simplicity and requires minimum interaction time.”"+ />+ </Mention>+ <Mention+ delay={1}+ logo={+ <div className="relative h-8 w-20">+ <Image+ src="/static/images/popsci-logo.svg"+ alt="PopSci"+ fill+ style={{ objectFit: "contain" }}+ />+ </div>+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="popsciQuote"+ defaults="“The perfect pick if you want to keep your RSVPs simple.”"+ />+ </Mention>+ </Mentions>+ </Section>+ <div>+ <Section>+ <SectionHeading>+ <SectionTitle>+ <Trans+ t={t}+ ns="home"+ i18nKey="faqTitle"+ defaults="Frequently asked questions"+ />+ </SectionTitle>+ <SectionDescription>+ <Trans+ t={t}+ ns="home"+ i18nKey="faqDescription"+ defaults="Quick answers about how Rallly works, pricing, and privacy."+ />+ </SectionDescription>+ </SectionHeading>+ <SectionContent>+ <Faq>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqExternalGuests"+ defaults="Can I invite people outside my organization?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqExternalGuestsAnswer"+ defaults="Yes. Anyone with the link can respond, whether or not they use Rallly and whichever calendar system their company runs on. They don't need an account and there is no limit on how many people you invite, so board members, clients and external counsel can all reply the same way."+ />+ </FaqItem>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqOnBehalf"+ defaults="Can I schedule on behalf of an executive?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqOnBehalfAnswer"+ defaults="Yes. You create and manage the poll, so the responses come back to you and you decide the final time. You can also add participants and fill in availability on someone's behalf, which is useful when a principal sends you their times directly instead of clicking the link."+ />+ </FaqItem>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqTimeZones"+ defaults="Does it handle meetings across time zones?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqTimeZonesAnswer"+ defaults="Yes. Each participant sees the proposed times in their own time zone automatically, so a London board member and a San Francisco executive are looking at the same slot without either of you converting anything by hand."+ />+ </FaqItem>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqChasing"+ defaults="Do I still have to chase people for replies?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqChasingAnswer"+ defaults="You can see at a glance who has responded and who hasn't, and get an email as responses come in. That turns the usual round of follow-up emails into a single reminder to the few people still outstanding."+ />+ </FaqItem>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqBranding"+ defaults="Can polls carry our company branding?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFaqBrandingAnswer"+ defaults="With <0>Rallly Pro</0> you can add your own logo and colours and remove Rallly attribution, so a poll you send to a board or a client looks like it came from your organization. Everything else is free to use."+ components={[+ <Link+ key="pricing"+ className="text-gray-800 underline underline-offset-2 hover:text-gray-600"+ href="/pricing"+ />,+ ]}+ />+ </FaqItem>+ <FaqItem+ question={+ <Trans+ t={t}+ ns="home"+ i18nKey="faqPrivacy"+ defaults="Is my data private?"+ />+ }+ >+ <Trans+ t={t}+ ns="home"+ i18nKey="faqPrivacyAnswer"+ defaults="Yes. Privacy is central to how we build Rallly. We do not show ads or sell your data, we collect only what we need to run the service, and polls on the free plan are deleted automatically once they become inactive. Rallly is also open source, so anyone can inspect how their data is handled. You can read the details in our <0>privacy policy</0>."+ components={[+ <Link+ key="privacy"+ className="text-gray-800 underline underline-offset-2 hover:text-gray-600"+ href="/privacy-policy"+ />,+ ]}+ />+ </FaqItem>+ </Faq>+ </SectionContent>+ </Section>+ <Section className="sm:py-24">+ <Cta+ title={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFinalCtaTitle"+ defaults="Ready to get that meeting in the diary?"+ />+ }+ description={+ <Trans+ t={t}+ ns="home"+ i18nKey="eaFinalCtaDescription"+ defaults="Set up your poll in under a minute, send one link, and stop chasing replies."+ />+ }+ buttonLabel={+ <Trans+ t={t}+ ns="home"+ i18nKey="createAPoll"+ defaults="Create a poll"+ />+ }+ hint={+ <Trans+ t={t}+ ns="home"+ i18nKey="hint"+ defaults="It's free! No login required."+ />+ }+ />+ </Section>+ </div>+ </div>+ );+}++export async function generateMetadata(props: {+ params: Promise<{ locale: string }>;+}): Promise<Metadata> {+ cacheLife("max");+ const { locale } = await props.params;+ const { t } = await getTranslation(locale, "home");+ return {+ title: t("eaMetaTitle", {+ ns: "home",+ defaultValue:+ "Scheduling for Executive Assistants | Free Meeting Poll Tool",+ }),+ description: t("eaMetaDescription", {+ ns: "home",+ defaultValue:+ "Rallly is a free scheduling tool for executive assistants. Coordinate meetings across busy calendars and time zones with one link. No account needed to respond.",+ }),+ };+}diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsxindex 0d989d48e..ebea883f7 100644--- a/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx@@ -8,7 +8,7 @@ import { Trans } from "react-i18next/TransWithoutContext";import { PeopleBadge, PollsBadge } from "@/components/home/animated-number";import { Cta } from "@/components/home/cta";import { Faq, FaqItem } from "@/components/home/faq";-import { Hero, HeroAnnouncement } from "@/components/home/hero";+import { Hero } 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";@@ -44,26 +44,6 @@ export default async function Page(props: {description={t("when2meetAlternativeDescription", {ns: "home",})}- announcement={- <HeroAnnouncement- href="/blog/mobile-voting-redesign"- badge={- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlogBadge"- defaults="New"- />- }- >- <Trans- t={t}- ns="home"- i18nKey="mobileVotingBlog"- defaults="A clearer way to vote on your phone"- />- </HeroAnnouncement>- }><HeroDemo locale={locale} /></Hero>diff --git a/apps/landing/src/app/[locale]/(main)/footer.tsx b/apps/landing/src/app/[locale]/(main)/footer.tsxindex f22eec29a..26bb618d4 100644--- a/apps/landing/src/app/[locale]/(main)/footer.tsx+++ b/apps/landing/src/app/[locale]/(main)/footer.tsx@@ -75,7 +75,7 @@ export const Footer = async ({ locale }: { locale: string }) => {</a></div></div>- <div className="grid grid-cols-1 gap-x-8 gap-y-12 sm:grid-cols-3">+ <div className="grid grid-cols-1 gap-x-8 gap-y-12 sm:grid-cols-2 lg:grid-cols-4"><div><div className="mb-6 font-medium text-gray-800 text-sm uppercase tracking-wide"><Trans t={t} ns="common" i18nKey="product" defaults="Product" />@@ -183,6 +183,31 @@ export const Footer = async ({ locale }: { locale: string }) => {</li></ul></div>+ <div>+ <div className="mb-6 font-medium text-gray-800 text-sm uppercase tracking-wide">+ <Trans+ t={t}+ ns="common"+ i18nKey="schedulingFor"+ defaults="Scheduling for"+ />+ </div>+ <ul className="grid gap-3 text-sm">+ <li>+ <LinkBase+ className="inline-block font-normal text-gray-600 hover:text-gray-800 hover:no-underline"+ href="/scheduling-for/executive-assistants"+ >+ <Trans+ t={t}+ ns="common"+ i18nKey="executiveAssistants"+ defaults="Executive assistants"+ />+ </LinkBase>+ </li>+ </ul>+ </div></div><div className="flex flex-col gap-x-8 gap-y-8 sm:pb-8 lg:flex-row lg:items-center lg:justify-between"><div className="flex flex-col gap-x-8 gap-y-2 sm:flex-row sm:items-center">diff --git a/apps/landing/src/app/sitemap.ts b/apps/landing/src/app/sitemap.tsindex cd5b4a141..aa523e75e 100644--- a/apps/landing/src/app/sitemap.ts+++ b/apps/landing/src/app/sitemap.ts@@ -8,6 +8,7 @@ const alternateLanguages = supportedLngs.filter((lng) => lng !== "en");const seoPages = ["/best-doodle-alternative",+ "/scheduling-for/executive-assistants","/free-scheduling-poll","/when2meet-alternative",];diff --git a/apps/landing/src/components/home/hero-demo/demo-data.ts b/apps/landing/src/components/home/hero-demo/demo-data.tsindex c5da96e35..7cc10a7a7 100644--- a/apps/landing/src/components/home/hero-demo/demo-data.ts+++ b/apps/landing/src/components/home/hero-demo/demo-data.ts@@ -10,31 +10,17 @@ export type DemoDay = {options: DemoOption[];};-// Participant names are sample data and stay untranslated; votes are indexed-// against the flattened option list (four Thursdays, two slots each).-export const demoParticipants: { name: string; votes: DemoVote[] }[] = [- {- name: "Margaret Ellis",- votes: ["ifNeedBe", "yes", "no", "yes", "yes", "yes", "no", "yes"],- },- {- name: "Priya Patel",- votes: ["yes", "yes", "yes", "no", "yes", "yes", "no", "yes"],- },- {- name: "Tom Becker",- votes: ["yes", "yes", "yes", "yes", "yes", "no", "ifNeedBe", "yes"],- },- {- name: "Grace Okafor",- votes: ["no", "yes", "no", "yes", "yes", "no", "no", "yes"],- },-];-const HOUR_MS = 60 * 60 * 1000;const DAY_MS = 24 * HOUR_MS;const SLOT_HOURS = [12, 18];+// How the four demo days are spread. "weekly" gives one day a week over a+// month, the unhurried shape of planning a standing meeting. "consecutive"+// gives four days in one week, which reads as coordination under time+// pressure. Either way it is four days of two slots — the vote arrays and the+// options grid are both fixed at eight.+export type DemoSpacing = "weekly" | "consecutive";+// The first Thursday at least a week out, as a plain YYYY-MM-DD string. This is// the only thing about the demo that depends on the current time, so it is the// cache key for the rendered demo: everything below is a pure function of it.@@ -52,11 +38,19 @@ export function getDemoAnchor(now: Date) {// The demo dates are floating wall times constructed in UTC and always// formatted with timeZone: "UTC", so the rendered clock times don't depend// on the server's time zone.-export function getDemoDays(anchor: string): DemoDay[] {+export function getDemoDays(+ anchor: string,+ spacing: DemoSpacing = "weekly",+): DemoDay[] {const [year, month, day] = anchor.split("-").map(Number);- const firstThursday = Date.UTC(year, month - 1, day);- return [0, 1, 2, 3].map((week) => {- const midnight = firstThursday + week * 7 * DAY_MS;+ const anchorThursday = Date.UTC(year, month - 1, day);+ // Consecutive runs Monday to Thursday of the anchor's week, so it stays on+ // weekdays and still ends on the anchor itself.+ const start =+ spacing === "consecutive" ? anchorThursday - 3 * DAY_MS : anchorThursday;+ const step = spacing === "consecutive" ? DAY_MS : 7 * DAY_MS;+ return [0, 1, 2, 3].map((index) => {+ const midnight = start + index * step;return {date: new Date(midnight),options: SLOT_HOURS.map((hour) => ({@@ -75,10 +69,13 @@ export function getInitials(name: string) {}// The count badge in the app includes both yes and if-need-be votes.-export function getScores(days: DemoDay[]) {+export function getScores(+ days: DemoDay[],+ participants: { votes: DemoVote[] }[],+) {const optionCount = days.reduce((sum, day) => sum + day.options.length, 0);return Array.from({ length: optionCount }, (_, index) =>- demoParticipants.reduce(+ participants.reduce((score, participant) =>participant.votes[index] === "no" ? score : score + 1,0,diff --git a/apps/landing/src/components/home/hero-demo/demo-presets.ts b/apps/landing/src/components/home/hero-demo/demo-presets.tsnew file mode 100644index 000000000..53c19d610--- /dev/null+++ b/apps/landing/src/components/home/hero-demo/demo-presets.ts@@ -0,0 +1,122 @@+import type { TFunction } from "i18next";+import type { DemoSpacing, DemoVote } from "./demo-data";++// The demo renders one of these presets. The audience pages (/for/*) show a+// poll that looks like one their reader would actually run, so the screenshot+// argues the case before the copy does.+export type DemoPreset = {+ title: string;+ description: string;+ organizer: string;+ location: string;+ spacing: DemoSpacing;+ participants: { name: string; votes: DemoVote[] }[];+};++export type DemoPresetName = "default" | "executiveAssistant";++// Votes are indexed against the flattened option list — four Thursdays, two+// slots each — so every participant needs exactly eight, or the scores and the+// winning-column highlight fall out of alignment. The last column is a "yes"+// from everyone in both presets, so the demo always resolves to a clear winner.+//+// Presets are built with literal t() calls rather than looked up by key: the+// extractor works by static analysis and removeUnusedKeys is on, so a dynamic+// key would be silently dropped from the locale files.+export function getDemoPreset(+ t: TFunction<"home">,+ preset: DemoPresetName,+): DemoPreset {+ if (preset === "executiveAssistant") {+ return {+ title: t("heroDemoEaTitle", {+ ns: "home",+ defaultValue: "Interview panel: Head of Finance",+ }),+ description: t("heroDemoEaDescription", {+ ns: "home",+ defaultValue:+ "Please mark every slot you could make this week. The candidate is flying in on Monday, so I'd like to confirm as early as I can.",+ }),+ organizer: t("heroDemoEaOrganizer", {+ ns: "home",+ defaultValue: "Organized by Sofia Almeida",+ }),+ location: t("heroDemoEaLocation", {+ ns: "home",+ defaultValue: "Meeting room 3 and Zoom",+ }),+ spacing: "consecutive",+ participants: executiveAssistantParticipants,+ };+ }++ return {+ title: t("heroDemoTitle", {+ ns: "home",+ defaultValue: "Q3 Board Meeting",+ }),+ description: t("heroDemoDescription", {+ ns: "home",+ defaultValue:+ "Please pick every time you could attend. We'll go with the one that works for everyone.",+ }),+ organizer: t("heroDemoOrganizer", {+ ns: "home",+ defaultValue: "Organized by Sofia Almeida",+ }),+ location: t("heroDemoLocation", {+ ns: "home",+ defaultValue: "Riverside Community Center",+ }),+ spacing: "weekly",+ participants: defaultParticipants,+ };+}++// Participant names are sample data and stay untranslated.+const defaultParticipants: DemoPreset["participants"] = [+ {+ name: "Margaret Ellis",+ votes: ["ifNeedBe", "yes", "no", "yes", "yes", "yes", "no", "yes"],+ },+ {+ name: "Priya Patel",+ votes: ["yes", "yes", "yes", "no", "yes", "yes", "no", "yes"],+ },+ {+ name: "Tom Becker",+ votes: ["yes", "yes", "yes", "yes", "yes", "no", "ifNeedBe", "yes"],+ },+ {+ name: "Grace Okafor",+ votes: ["no", "yes", "no", "yes", "yes", "no", "no", "yes"],+ },+];++// An interview panel: four colleagues plus the candidate, who is the one+// external in the room and the reason the poll gets shared as a link. Their+// availability is the tightest, which is what makes the last slot the only one+// that works for everyone.+const executiveAssistantParticipants: DemoPreset["participants"] = [+ {+ name: "Daniel Whitfield",+ votes: ["no", "ifNeedBe", "no", "yes", "no", "yes", "ifNeedBe", "no"],+ },+ {+ name: "Amara Osei",+ votes: ["ifNeedBe", "no", "yes", "yes", "no", "ifNeedBe", "no", "yes"],+ },+ {+ name: "Henrik Lindqvist",+ votes: ["no", "yes", "ifNeedBe", "yes", "yes", "yes", "no", "no"],+ },+ {+ name: "Claire Fontaine",+ votes: ["yes", "no", "no", "yes", "ifNeedBe", "no", "yes", "ifNeedBe"],+ },+ {+ name: "Jordan Reyes",+ votes: ["no", "no", "no", "yes", "no", "no", "ifNeedBe", "yes"],+ },+];diff --git a/apps/landing/src/components/home/hero-demo/desktop-demo.tsx b/apps/landing/src/components/home/hero-demo/desktop-demo.tsxindex f44fc81dc..8ce8064c1 100644--- a/apps/landing/src/components/home/hero-demo/desktop-demo.tsx+++ b/apps/landing/src/components/home/hero-demo/desktop-demo.tsx@@ -9,8 +9,9 @@ import {} from "lucide-react";import * as React from "react";import type { DemoDay } from "./demo-data";-import { demoParticipants, formatDemoParts, getInitials } from "./demo-data";+import { formatDemoParts, getInitials } from "./demo-data";import { DemoFrame, DemoScreen } from "./demo-frame";+import type { DemoPreset } from "./demo-presets";import { VoteCount } from "./vote-count";import { VoteIcon } from "./vote-icon";@@ -18,15 +19,16 @@ export const DesktopDemo = ({locale,days,scores,+ preset,t,}: {locale: string;days: DemoDay[];scores: number[];+ preset: DemoPreset;t: TFunction<"home">;}) => {const format = formatDemoParts(locale);- const optionCount = scores.length;const topScore = Math.max(...scores);const monthGroups: { label: string; span: number }[] = [];@@ -49,33 +51,20 @@ export const DesktopDemo = ({<div className="space-y-3 p-4 sm:p-5"><div><h3 className="font-semibold text-gray-900 text-lg tracking-tight">- {t("heroDemoTitle", {- ns: "home",- defaultValue: "Q3 Board Meeting",- })}+ {preset.title}</h3><p className="mt-1 text-gray-600 text-sm">- {t("heroDemoDescription", {- ns: "home",- defaultValue:- "Please pick every time you could attend. We'll go with the one that works for everyone.",- })}+ {preset.description}</p></div><div className="space-y-1.5 text-gray-600 text-sm"><div className="flex items-center gap-2"><UserIcon className="size-4 text-gray-400" />- {t("heroDemoOrganizer", {- ns: "home",- defaultValue: "Organized by Sofia Almeida",- })}+ {preset.organizer}</div><div className="flex items-center gap-2"><MapPinIcon className="size-4 text-gray-400" />- {t("heroDemoLocation", {- ns: "home",- defaultValue: "Riverside Community Center",- })}+ {preset.location}</div></div><div>@@ -121,21 +110,13 @@ export const DesktopDemo = ({})}</span><span className="rounded-md border px-1.5 py-0.5 text-gray-500 text-xs">- {demoParticipants.length}+ {preset.participants.length}</span><span className="flex size-6 items-center justify-center rounded-md border text-gray-500"><PlusIcon className="size-3.5" /></span></div><div className="flex items-center gap-3 text-gray-500 text-sm">- <span>- {t("heroDemoOptionCount", {- ns: "home",- defaultValue:- "{count, plural, one {# option} other {# options}}",- count: optionCount,- })}- </span><Maximize2Icon className="size-4" /></div></div>@@ -204,7 +185,7 @@ export const DesktopDemo = ({);}),)}- {demoParticipants.map((participant) => (+ {preset.participants.map((participant) => (<React.Fragment key={participant.name}><div className="flex items-center gap-2.5 border-gray-100 border-t px-3 py-3 text-left"><span className="flex size-7 items-center justify-center rounded-full bg-gray-100 font-medium text-[10px] text-gray-600 uppercase">diff --git a/apps/landing/src/components/home/hero-demo/hero-demo.tsx b/apps/landing/src/components/home/hero-demo/hero-demo.tsxindex 325f67bd0..82c38da47 100644--- a/apps/landing/src/components/home/hero-demo/hero-demo.tsx+++ b/apps/landing/src/components/home/hero-demo/hero-demo.tsx@@ -1,6 +1,8 @@import { cacheLife } from "next/cache";import { getTranslation } from "@/i18n/server";import { getDemoAnchor, getDemoDays, getScores } from "./demo-data";+import type { DemoPresetName } from "./demo-presets";+import { getDemoPreset } from "./demo-presets";import { DesktopDemo } from "./desktop-demo";import { MobileDemo } from "./mobile-demo";import { TryItPrompt } from "./try-it-prompt";@@ -14,23 +16,38 @@ import { TryItPrompt } from "./try-it-prompt";// the HTML and the RSC payload are produced from the same key, so they cannot// be generated on opposite sides of the weekly rollover and disagree. Revalidating// hourly keeps the rendered dates from trailing the rollover for long.-export const HeroDemo = async ({ locale }: { locale: string }) => {+export const HeroDemo = async ({+ locale,+ preset = "default",+}: {+ locale: string;+ preset?: DemoPresetName;+}) => {"use cache";cacheLife("hours");- return <CachedDemo locale={locale} anchor={getDemoAnchor(new Date())} />;+ return (+ <CachedDemo+ locale={locale}+ preset={preset}+ anchor={getDemoAnchor(new Date())}+ />+ );};const CachedDemo = async ({locale,+ preset,anchor,}: {locale: string;+ preset: DemoPresetName;anchor: string;}) => {"use cache";const { t } = await getTranslation<"home">(locale, "home");- const days = getDemoDays(anchor);- const scores = getScores(days);+ const demoPreset = getDemoPreset(t, preset);+ const days = getDemoDays(anchor, demoPreset.spacing);+ const scores = getScores(days, demoPreset.participants);return (<div className="relative z-10 select-none md:mx-auto md:max-w-full lg:mb-12">@@ -39,7 +56,13 @@ const CachedDemo = async ({aria-hidden="true"className="w-max [zoom:0.65] md:[zoom:0.75] lg:[zoom:1]">- <DesktopDemo locale={locale} days={days} scores={scores} t={t} />+ <DesktopDemo+ locale={locale}+ days={days}+ scores={scores}+ preset={demoPreset}+ t={t}+ /></div></div><div className="hidden lg:absolute lg:-right-6 lg:-bottom-12 lg:block lg:w-[320px]">