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.

86 linesCodeBlameRaw
1/**
2 * g1t's logo: G1T in 5×7 pixel capitals, the 1 in lavender. Each pixel is
3 * its own square, 0.8 of its cell. The icon is the 1 alone. The same
4 * shapes as the favicon and the brand files in .g1t/brand and public/brand.
5 * The product name stays "g1t" in text; only the artwork is capitals.
6 */
7
8const G = [".###.", "#...#", "#....", "#.###", "#...#", "#...#", ".###."];
9const ONE = ["..#..", ".##..", "#.#..", "..#..", "..#..", "..#..", "#####"];
10const T = ["#####", "..#..", "..#..", "..#..", "..#..", "..#..", "..#.."];
11
12type Pixel = { x: number; y: number; one: boolean };
13
14function pixels(rows: string[], dx: number, one: boolean): Pixel[] {
15 return rows.flatMap((row, y) => [...row].flatMap((c, x) => (c === "#" ? [{ x: dx + x, y, one }] : [])));
16}
17
18/** G at 0, the 1 at 6, the T at 10: its bar tucks in over the 1's foot. */
19const WORD = [...pixels(G, 0, false), ...pixels(ONE, 6, true), ...pixels(T, 10, false)];
20const ICON = pixels(ONE, 0, true);
21
22/** Cells of 10 units, squares of 8, centred. */
23function Pixels({ of }: { of: Pixel[] }) {
24 return of.map((p) => (
25 <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"} />
26 ));
27}
28
29/**
30 * The icon: the pixel 1, centred in a square. `tight` crops to the ink, for
31 * setting it beside type, where it must stand on the baseline.
32 */
33export function Mark({ className, tight = false }: { className?: string; tight?: boolean }) {
34 return (
35 <svg viewBox={tight ? "1 1 48 68" : "-15 -5 80 80"} className={className} aria-hidden="true">
36 <Pixels of={ICON} />
37 </svg>
38 );
39}
40
41/**
42 * The 1 set beside type in a control: whole cells, so at
43 * 14px tall each one lands on 2px (4 on a sharp screen) and every square
44 * stays sharp, lavender on its own with nothing around it.
45 */
46export function MarkGlyph({ className = "h-3.5" }: { className?: string }) {
47 return (
48 <svg viewBox="0 0 50 70" className={`w-auto shrink-0 ${className}`} shapeRendering="crispEdges" aria-hidden="true">
49 <Pixels of={ICON} />
50 </svg>
51 );
52}
53
54/**
55 * The wordmark as one picture, sized by its font size: a cell is 0.125em,
56 * so the letters stand 0.85em tall on the baseline, about the height of
57 * the type around them.
58 */
59export function Logo({ className = "text-[1.5rem]" }: { className?: string }) {
60 return (
61 <span className={`inline-flex items-baseline leading-none text-fg ${className}`}>
62 <svg viewBox="1 1 148 68" role="img" aria-label="g1t" className="h-[0.85em] w-auto shrink-0 self-baseline">
63 <Pixels of={WORD} />
64 </svg>
65 </span>
66 );
67}
68
69const FOUR = ["...#.", "..##.", ".#.#.", "#..#.", "#####", "...#.", "...#."];
70const ZERO = [".###.", "#...#", "#...#", "#...#", "#...#", "#...#", ".###."];
71/** 4 at 0, the 0 at 6, 4 at 12: the logo's cells and spacing. */
72const FOUR_O_FOUR = [...pixels(FOUR, 0, false), ...pixels(ZERO, 6, true), ...pixels(FOUR, 12, false)];
73
74/**
75 * 404 in the logo's pixels, the 0 in lavender where the logo has its 1.
76 * Sized by its font size, like the wordmark.
77 */
78export function Pixel404({ className = "text-[4rem]" }: { className?: string }) {
79 return (
80 <span className={`inline-flex leading-none text-fg ${className}`}>
81 <svg viewBox="1 1 168 68" role="img" aria-label="404" className="h-[0.85em] w-auto shrink-0" shapeRendering="crispEdges">
82 <Pixels of={FOUR_O_FOUR} />
83 </svg>
84 </span>
85 );
86}