137 lines · 5.5 KB
import { Link } from "@tanstack/react-router";
import { RepoList } from "~/components/RepoList";
import { VideoPlayer } from "~/components/VideoPlayer";
import { videoUrl } from "~/lib/video";
import { FEATURE_CATALOG } from "~/lib/marketing/catalog";
import { FEATURE_PAGES } from "~/lib/marketing/features";
import { SOURCE_URL } from "~/lib/marketing/site";
import { buttonClass } from "~/ui/Button";
import { CodeBlock } from "~/ui/CodeBlock";
import { PageContainer } from "~/ui/PageContainer";
import { Panel } from "~/ui/Panel";
import { TextLink } from "~/ui/TextLink";
import { CtaBand } from "./CtaBand";
import { DisplayTitle } from "./DisplayTitle";
import { PullRequestDemo } from "./demos/PullRequestDemo";
import { Spotlight } from "./Spotlight";

const SPOTLIGHTS = ["review", "actions", "ai"] as const;

const SPOTLIT: ReadonlySet<string> = new Set(SPOTLIGHTS);
const MORE_PAGES = FEATURE_PAGES.filter((page) => !SPOTLIT.has(page.slug));
const FEATURE_COUNT = FEATURE_CATALOG.reduce((total, group) => total + group.items.length, 0);

const HERO_POINTS = ["Open source under 0BSD", "Import from any Git remote", "GitHub Actions–style workflows"] as const;

const QUICKSTART = `git clone ${SOURCE_URL}.git gitfor && cd gitfor
bun install
bun run deploy`;

const SECTION = "border-t border-kumo-hairline pt-16";

const DEMO_VIDEO = { id: "gitfor-demo", version: "v1" } as const;
const DEMO_CAPTIONS = [
  { src: videoUrl(DEMO_VIDEO.id, DEMO_VIDEO.version, "captions/en.vtt"), srcLang: "en", label: "English" },
];

type Repos = Parameters<typeof RepoList>[0]["repos"];

export function Landing({ repos }: { repos: Repos }) {
  return (