Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

58 linesCodeBlameRaw
1import type { ReactNode } from "react";
2import { Link } from "react-router";
3
4import { Logo } from "./logo";
5import { Progress, useLeaving } from "./shell";
6import { POLICIES } from "../lib/legal";
7import { STATUS_URL } from "../lib/status";
8
9const FOOT_LINK = "rounded px-1.5 py-1 text-xs text-faint transition-colors hover:text-fg focus-visible:ring-2 focus-visible:ring-accent outline-none";
10
11/**
12 * The frame for signing in, signing up and choosing a workspace
13 * (lib/chrome.ts, `standalone`): no header, no sidebar, no rail. The
14 * logo, then the page in a narrow column at the centre, and a quiet row
15 * of links at the foot of the window.
16 */
17export function StandaloneFrame({ children }: { children: ReactNode }) {
18 const leaving = useLeaving();
19 const terms = POLICIES.find((policy) => policy.slug === "terms");
20 const privacy = POLICIES.find((policy) => policy.slug === "privacy");
21 return (
22 <div className="flex min-h-dvh flex-col pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]">
23 <Progress />
24 <div
25 id="content"
26 tabIndex={-1}
27 {...leaving}
28 className={`flex grow flex-col items-center px-4 pt-[max(2.5rem,9vh)] pb-10 outline-none ${leaving.className}`}
29 >
30 <Link to="/" aria-label="g1t" className="flex rounded-md p-1 outline-none focus-visible:ring-2 focus-visible:ring-accent">
31 <Logo className="text-[1.75rem]" />
32 </Link>
33 <div className="w-full">{children}</div>
34 </div>
35 <nav aria-label="About g1t" className="flex flex-wrap items-center justify-center gap-x-1 gap-y-1 px-4 pb-5">
36 {terms && (
37 <Link to={`/policies/${terms.slug}`} className={FOOT_LINK}>
38 Terms
39 </Link>
40 )}
41 {privacy && (
42 <Link to={`/policies/${privacy.slug}`} className={FOOT_LINK}>
43 Privacy
44 </Link>
45 )}
46 <a href="https://docs.g1t.sh/" className={FOOT_LINK}>
47 Docs
48 </a>
49 <a href={STATUS_URL} className={FOOT_LINK}>
50 Status
51 </a>
52 <Link to="/support" className={FOOT_LINK}>
53 Support
54 </Link>
55 </nav>
56 </div>
57 );
58}