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.

56 linesCodeBlameRaw
1/**
2 * Copied from apps/web/app/components/logo.tsx; keep the two in step.
3 * g1t's logo: G1T in 5×7 pixel capitals, the 1 in lavender. Each pixel is
4 * its own square, 0.8 of its cell. The icon is the 1 alone. The same
5 * shapes as the favicon and the brand files in .g1t/brand and public/brand.
6 * The product name stays "g1t" in text; only the artwork is capitals.
7 */
8
9const G = [".###.", "#...#", "#....", "#.###", "#...#", "#...#", ".###."];
10const ONE = ["..#..", ".##..", "#.#..", "..#..", "..#..", "..#..", "#####"];
11const T = ["#####", "..#..", "..#..", "..#..", "..#..", "..#..", "..#.."];
12
13type Pixel = { x: number; y: number; one: boolean };
14
15function pixels(rows: string[], dx: number, one: boolean): Pixel[] {
16 return rows.flatMap((row, y) => [...row].flatMap((c, x) => (c === "#" ? [{ x: dx + x, y, one }] : [])));
17}
18
19/** G at 0, the 1 at 6, the T at 10: its bar tucks in over the 1's foot. */
20const WORD = [...pixels(G, 0, false), ...pixels(ONE, 6, true), ...pixels(T, 10, false)];
21const ICON = pixels(ONE, 0, true);
22
23/** Cells of 10 units, squares of 8, centred. */
24function Pixels({ of }: { of: Pixel[] }) {
25 return of.map((p) => (
26 <rect key={`${p.x}.${p.y}`} x={p.x * 10 + 1} y={p.y * 10 + 1} width="8" height="8" fill={p.one ? "var(--color-accent)" : "currentColor"} />
27 ));
28}
29
30/**
31 * The icon: the pixel 1, centred in a square. `tight` crops to the ink, for
32 * setting it beside type, where it must stand on the baseline.
33 */
34export function Mark({ className, tight = false }: { className?: string; tight?: boolean }) {
35 return (
36 <svg viewBox={tight ? "1 1 48 68" : "-15 -5 80 80"} className={className} aria-hidden="true">
37 <Pixels of={ICON} />
38 </svg>
39 );
40}
41
42/** The wordmark, with sudo's badge beside it. */
43export function Logo({ className = "text-[1.5rem]" }: { className?: string }) {
44 return (
45 <span className="inline-flex items-center gap-2">
46 <span className={`inline-flex items-baseline leading-none text-fg ${className}`}>
47 <svg viewBox="1 1 148 68" role="img" aria-label="g1t" className="h-[0.85em] w-auto shrink-0 self-baseline">
48 <Pixels of={WORD} />
49 </svg>
50 </span>
51 <span className="rounded-full bg-accent/12 px-2 py-0.5 font-mono text-[0.7rem] font-semibold tracking-wide text-accent ring-1 ring-accent/35 ring-inset">
52 sudo
53 </span>
54 </span>
55 );
56}