xonecas.io
8356
Wx

www-xonecas-io / commit b1edec1

style guide: tokens, tags, components and the heat-portrait icon on /style (1001)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 b1edec1bb32e76f6e1accef59a0fbdfef3aba5db parent 41c0e9d

13 files changed

CLAUDE.md+3−0
@@ -0,0 +1,3 @@
1+# tools
2+
3+`agent-browser` is available.
internal/site/assets/site.css+48−5
@@ -1,11 +1,54 @@
11 @import "tailwindcss";
22 @source "../templates";
3+@source inline("bg-{fe,be,both,none,h0,h1,h2,h3,h4,h5,h6,paper,card,ink,soft,line,empty,accent,det,pre,add,del} text-{t0,t1,t2,t3,t4,t5,t6}");
34
5+/* Every colour is light-dark(): the page follows the system, and data-theme forces one. */
46 @theme {
5- --color-paper: #f4efe3;
6- --color-ink: #1a1a1a;
7- --color-soft: #1a1a1a99;
8- --color-line: #1a1a1a22;
9- --font-sans: "IBM Plex Sans Condensed", sans-serif;
7+ --color-paper: light-dark(#f4efe3, #15140f);
8+ --color-card: light-dark(#fffaf0, #1d1b15);
9+ --color-ink: light-dark(#1a1a1a, #f1ead8);
10+ --color-soft: light-dark(#1a1a1a99, #f1ead899);
11+ --color-line: light-dark(#1a1a1a22, #f1ead81f);
12+ --color-empty: light-dark(#e7dfcd, #25231c);
13+ --color-accent: light-dark(#a8461f, #ffc94d);
14+ --color-det: light-dark(#1a1a1a, #ffd166);
15+ --color-det-fg: light-dark(#ffd166, #15140f);
16+ --color-pre: light-dark(#1a1a1a, #0b0a07);
17+ --color-pre-fg: light-dark(#f4efe3, #f1ead8);
18+ --color-add: light-dark(#dcefcc, #22321b);
19+ --color-del: light-dark(#f6d9cb, #3b2219);
20+
21+ /* groups: the element tile colours */
22+ --color-fe: light-dark(#ffd166, #f2c45a);
23+ --color-be: light-dark(#9bd1ff, #86bde8);
24+ --color-both: light-dark(#c7ecb0, #b2d99a);
25+ --color-none: light-dark(#ddd3bd, #bfb49c);
26+ --color-tile-ink: #111;
27+
28+ /* heat: h0 is empty, h6 the busiest; tN is the text on hN */
29+ --color-h0: var(--color-empty);
30+ --color-h1: light-dark(#f8e6ae, #4d3f22);
31+ --color-h2: light-dark(#ffd166, #6e5626);
32+ --color-h3: light-dark(#f5a64f, #8f6a28);
33+ --color-h4: light-dark(#dd7034, #c48f2e);
34+ --color-h5: light-dark(#a8461f, #efb63e);
35+ --color-h6: light-dark(#1a1a1a, #ffe7a0);
36+ --color-t0: var(--color-soft);
37+ --color-t1: light-dark(#1a1a1a99, #f1ead8);
38+ --color-t2: light-dark(#1a1a1a, #f1ead8);
39+ --color-t3: light-dark(#1a1a1a, #f1ead8);
40+ --color-t4: light-dark(#1a1a1a, #15140f);
41+ --color-t5: light-dark(#fffaf0, #15140f);
42+ --color-t6: light-dark(#ffd166, #15140f);
43+
44+ --font-sans: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
1045 --font-mono: "IBM Plex Mono", ui-monospace, monospace;
46+ --font-serif: "IBM Plex Serif", Georgia, serif;
47+}
48+
49+@layer base {
50+ :root { color-scheme: light dark; }
51+ [data-theme=light] { color-scheme: light; }
52+ [data-theme=dark] { color-scheme: dark; }
53+ body { -webkit-text-size-adjust: 100%; }
1154 }
internal/site/build.go+49−7
@@ -3,10 +3,13 @@ package site
33
44 import (
55 "embed"
6+ "errors"
67 "html/template"
8+ "io/fs"
79 "os"
810 "os/exec"
911 "path/filepath"
12+ "strings"
1013
1114 "xonecas.io/site/internal/repo"
1215 )
@@ -14,25 +17,51 @@ import (
1417 //go:embed templates/*.html
1518 var templates embed.FS
1619
17-var pages = template.Must(template.ParseFS(templates, "templates/*.html"))
20+//go:embed static
21+var static embed.FS
22+
23+var funcs = template.FuncMap{
24+ "list": func(v ...any) []any { return v },
25+ "lower": strings.ToLower,
26+ "dict": func(kv ...any) (map[string]any, error) {
27+ if len(kv)%2 != 0 {
28+ return nil, errors.New("dict needs key, value pairs")
29+ }
30+ m := map[string]any{}
31+ for i := 0; i < len(kv); i += 2 {
32+ m[kv[i].(string)] = kv[i+1]
33+ }
34+ return m, nil
35+ },
36+}
37+
38+var pages = template.Must(template.New("").Funcs(funcs).ParseFS(templates, "templates/*.html"))
1839
1940 // Build writes the site for repos into out. With a tailwind binary it also compiles site.css.
2041 func Build(repos []repo.Repo, out, tailwind string) error {
21- if err := os.MkdirAll(out, 0o755); err != nil {
22- return err
42+ for path, page := range map[string]struct {
43+ name string
44+ data any
45+ }{
46+ "index.html": {"index.html", repos},
47+ "style/index.html": {"style.html", styleData()},
48+ } {
49+ if err := render(filepath.Join(out, path), page.name, page.data); err != nil {
50+ return err
51+ }
2352 }
24- if err := render(filepath.Join(out, "index.html"), "index.html", repos); err != nil {
53+ if err := copyStatic(out); err != nil || tailwind == "" {
2554 return err
2655 }
27- if tailwind == "" {
28- return nil
29- }
3056 cmd := exec.Command(tailwind, "-i", "internal/site/assets/site.css", "-o", filepath.Join(out, "site.css"), "--minify")
3157 cmd.Stderr = os.Stderr
3258 return cmd.Run()
3359 }
3460
3561 func render(path, name string, data any) error {
62+ if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
63+ return err
64+ }
3665 f, err := os.Create(path)
3766 if err != nil {
3867 return err
@@ -40,3 +69,16 @@ func render(path, name string, data any) error {
4069 defer f.Close()
4170 return pages.ExecuteTemplate(f, name, data)
4271 }
72+
73+func copyStatic(out string) error {
74+ return fs.WalkDir(static, "static", func(path string, d fs.DirEntry, err error) error {
75+ if err != nil || d.IsDir() {
76+ return err
77+ }
78+ b, err := static.ReadFile(path)
79+ if err != nil {
80+ return err
81+ }
82+ return os.WriteFile(filepath.Join(out, strings.TrimPrefix(path, "static/")), b, 0o644)
83+ })
84+}
internal/site/static/logo.svg+1−0
@@ -0,0 +1 @@
1+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="3" fill="#f4efe3"/><rect x="19.43" y="2.00" width="3.36" height="3.36" rx=".6" fill="#f8e6ae"/><rect x="23.79" y="2.00" width="3.36" height="3.36" rx=".6" fill="#f5a64f"/><rect x="28.14" y="2.00" width="3.36" height="3.36" rx=".6" fill="#dd7034"/><rect x="32.50" y="2.00" width="3.36" height="3.36" rx=".6" fill="#ffd166"/><rect x="10.71" y="6.36" width="3.36" height="3.36" rx=".6" fill="#f8e6ae"/><rect x= …
internal/site/style.go+51−0
@@ -0,0 +1,51 @@
1+package site
2+
3+// styleData is the sample content of the /style page, taken from real projects.
4+func styleData() map[string]any {
5+ mc := Element{64, 875, "Mc", "mini-coder", "none", true}
6+ zn := Element{60, 255, "Zn", "Zoea-Nova", "be", true}
7+ fn := Element{3, 11, "Fn", "ffmpeg-node", "none", false}
8+ xc := Element{13, 61, "Xc", "xonecas.com", "fe", false}
9+ cl := Element{75, 17, "Cl", "clanker-and-the-dev", "both", true}
10+ return map[string]any{
11+ "Colours": []string{"paper", "card", "ink", "soft", "line", "empty", "accent", "det", "pre", "add", "del"},
12+ "Groups": []Element{{1, 0, "Fe", "frontend", "fe", false}, {2, 0, "Be", "backend", "be", false}, {3, 0, "Bo", "both", "both", false}, {4, 0, "Ne", "neither", "none", false}, {5, 0, "Po", "post-AI", "none", true}},
13+ "Big": mc,
14+ "Heat": []int{0, 2, 8, 27, 62, 205, 625},
15+ "Tags": []string{"frontend", "backend", "small", "big", "pre-AI", "post-AI"},
16+ "Rows": []ProjectRow{
17+ {mc, "A good idea 👾 A fast, transparent agent for the terminal", "TypeScript", 94.3, 4.7, 6, []string{"post-AI", "big"}},
18+ {zn, "Zoea-Nova is a high-performance command center designed to orchestrate massive swarms of agents", "Go", 95.8, 3.1, 5, []string{"post-AI", "big", "backend"}},
19+ {cl, "Terminal comics from the AI coding build log", "Python", 97.4, 1.6, 2, []string{"post-AI", "small", "frontend", "backend"}},
20+ {xc, "My space online.", "JavaScript", 3.6, 5.7, 3, []string{"pre-AI", "big", "frontend"}},
21+ {fn, "Node.js Module for ffmpeg library.", "JavaScript", 0, 34, 1, []string{"pre-AI", "small"}},
22+ },
23+ "Tree": map[string]any{
24+ "Head": Commit{mc, "a2174ac", "chore: pkg bump", "xonecas", "2026-10-02"},
25+ "Entries": []TreeEntry{
26+ {true, "bin", "feat: mini-coder-next 0.8.x initial implementation", "2026-09-22"},
27+ {true, "src", "fix: don't separate the diff from the related bash call", "2026-09-29"},
28+ {false, ".gitignore", "feat: fix type-stripping error when using from npm", "2026-10-02"},
29+ {false, "AGENTS.md", "docs: kitty remote-control section in AGENTS.md", "2026-09-26"},
30+ {false, "package.json", "chore: pkg bump", "2026-10-02"},
31+ {false, "README.md", "feat: docs and relaxed config", "2026-09-28"},
32+ },
33+ },
34+ "Code": map[string]any{"Name": "README.md · Usage", "Code": "ffmpeg.call(\n [ ... ], // array of ffmpeg flags\n callback // function to call after ffmpeg is done\n);\n\nffmpeg.call(['-i', 'input.avi', '-vcodec', 'libx264', 'output.mp4'], function (err, stdout) {\n if (err) throw err;\n});"},
35+ "Diff": Diff{"ffmpeg-node.js", 3, 2, "@@ -12,7 +12,8 @@ ffmpeg.exec = function (params, callback) {", []DiffLine{
36+ {" ", 12, 12, " var args = ['-y'];"},
37+ {"-", 13, 0, " args = args.concat(params);"},
38+ {"-", 14, 0, " exec('ffmpeg ' + args.join(' '), callback);"},
39+ {"+", 0, 13, " for (var key in params) {"},
40+ {"+", 0, 14, " args.push(key, params[key]);"},
41+ {"+", 0, 15, " }"},
42+ {" ", 15, 16, "};"},
43+ }},
44+ "Commits": []Commit{
45+ {Element{56, 96, "Df", "dotfiles", "none", true}, "c1dddf3", "dotfiles: sync", "xonecas", "2026-11-07"},
46+ {Element{79, 113, "Mi", "mini-coding-agent", "be", true}, "4cf0bc6", "feat: suggest models to use the cwd param instead of cd spam", "xonecas", "2026-10-28"},
47+ {mc, "a2174ac", "chore: pkg bump", "xonecas", "2026-10-02"},
48+ {fn, "8974cc5", "Merge pull request #8 from takanamito/fix-exec-method-document", "Sean Caetano Martin", "2016-06-20"},
49+ },
50+ }
51+}
internal/site/templates/components.html+79−0
@@ -0,0 +1,79 @@
1+{{/* Components. Each takes its view type from view.go. */}}
2+
3+{{define "nav"}}
4+<header class="flex flex-wrap items-center gap-x-6 gap-y-2 px-4 sm:px-8 py-3 border-b-[1.5px] border-ink">
5+ <a href="/" class="flex items-center gap-2 font-bold text-xl"><img src="/logo.svg" alt="" width="32" height="32" class="rounded-[2px]">xonecas.io</a>
6+ <nav class="flex gap-5 font-semibold">
7+ {{range $l := list "Overview" "Projects" "Activity"}}<a href="{{if eq $l "Overview"}}/{{else}}/{{lower $l}}/{{end}}" class="{{if eq $l $}}underline underline-offset-[6px] decoration-[3px]{{else}}no-underline{{end}}">{{$l}}</a>{{end}}
8+ </nav>
9+ <form action="/projects/" class="w-full sm:w-auto sm:ml-auto"><input name="q" placeholder="Search 82 projects" class="w-full sm:w-80 px-3 py-1.5 border-[1.5px] border-ink rounded-[2px] bg-card text-sm placeholder:text-soft"></form>
10+</header>
11+{{end}}
12+
13+{{define "element"}}{{/* dict "El" Element "Size" xs|sm|lg */}}
14+{{with .El}}<div class="bg-{{.Group}} text-tile-ink rounded-[2px] flex flex-col shrink-0 overflow-hidden {{if .Post}}outline-[2.5px] -outline-offset-[2.5px] outline-tile-ink{{end}}
15+ {{if eq $.Size "xs"}}size-[30px] items-center justify-center{{else if eq $.Size "sm"}}size-12 px-1 py-0.5{{else}}size-[124px] px-2 py-1.5{{end}}" title="{{.Name}}">
16+ {{if ne $.Size "xs"}}<div class="flex justify-between {{if eq $.Size "lg"}}text-[13px]{{else}}text-[10px]{{end}}"><span>{{.Num}}</span><span>{{.Weight}}</span></div>{{end}}
17+ <div class="font-bold leading-none {{if eq $.Size "xs"}}text-[15px]{{else if eq $.Size "sm"}}text-[19px]{{else}}text-[58px] mt-1{{end}}">{{.Sym}}</div>
18+ {{if eq $.Size "lg"}}<div class="mt-auto text-[13px] truncate">{{.Name}}</div>{{end}}
19+</div>{{end}}
20+{{end}}
21+
22+{{define "tag"}}{{/* one of frontend, backend, small, big, pre-AI, post-AI */}}
23+<span class="inline-flex items-center gap-1.5 border-[1.5px] border-ink rounded-[2px] px-2 py-px text-[13px] font-semibold whitespace-nowrap">
24+ <i class="inline-block rounded-[1px] {{if eq . "frontend"}}size-2.5 bg-fe outline outline-tile-ink{{else if eq . "backend"}}size-2.5 bg-be outline outline-tile-ink{{else if eq . "small"}}size-1.5 bg-ink{{else if eq . "big"}}size-3 bg-ink{{else if eq . "pre-AI"}}size-2.5 bg-none{{else}}size-2.5 bg-none outline-[2.5px] -outline-offset-[2.5px] outline-tile-ink{{end}}"></i>{{.}}
25+</span>
26+{{end}}
27+
28+{{define "project-row"}}
29+<div class="@container"><a href="/projects/{{.El.Name}}/" class="grid grid-cols-[48px_1fr] @3xl:grid-cols-[48px_minmax(0,2fr)_6rem_minmax(0,2fr)_4rem_minmax(0,1.6fr)] gap-x-4 gap-y-1 items-center py-2 border-b border-line no-underline">
30+ {{template "element" (dict "El" .El "Size" "sm")}}
31+ <div class="min-w-0"><b class="block truncate">{{.El.Name}}</b><div class="text-sm text-soft truncate">{{or .Desc "No description"}}</div></div>
32+ <span class="hidden @3xl:block text-sm text-soft">{{.Lang}}</span>
33+ <div class="col-start-2 @3xl:col-start-auto relative h-3.5 bg-empty rounded-[2px]"><div class="absolute inset-y-0 min-w-1.5 rounded-[2px] bg-h{{.Heat}}" style="left:{{.From}}%;width:{{.Width}}%"></div></div>
34+ <b class="hidden @3xl:block text-right">{{.El.Weight}}</b>
35+ <div class="col-start-2 @3xl:col-start-auto flex flex-wrap gap-1">{{range .Tags}}{{template "tag" .}}{{end}}</div>
36+</a></div>
37+{{end}}
38+
39+{{define "file-tree"}}{{/* dict "Head" Commit "Entries" []TreeEntry */}}
40+<div class="@container"><div class="border-[1.5px] border-ink rounded-[2px] bg-card text-[14.5px]">
41+ {{with .Head}}<div class="flex flex-wrap gap-x-3 px-4 py-2 bg-empty text-sm"><b>{{.Author}}</b><span class="min-w-0 flex-1 truncate">{{.Msg}}</span><code class="font-mono text-accent">{{.Hash}}</code><span class="text-soft">{{.Date}}</span></div>{{end}}
42+ {{range .Entries}}<div class="grid grid-cols-[1.25rem_minmax(0,1fr)_auto] @xl:grid-cols-[1.25rem_14rem_minmax(0,1fr)_6rem] gap-x-3 px-4 py-1.5 border-t border-line">
43+ <span class="text-accent">{{if .Dir}}▸{{else}}·{{end}}</span>
44+ <span class="truncate {{if .Dir}}font-bold{{end}}">{{.Name}}{{if .Dir}}/{{end}}</span>
45+ <span class="hidden @xl:block truncate text-soft">{{.Msg}}</span>
46+ <span class="text-right text-sm text-soft">{{.Date}}</span>
47+ </div>{{end}}
48+</div></div>
49+{{end}}
50+
51+{{define "code"}}{{/* dict "Name" file "Code" text */}}
52+<figure class="m-0">
53+ {{with .Name}}<figcaption class="font-mono text-xs text-soft mb-1">{{.}}</figcaption>{{end}}
54+ <pre class="bg-pre text-pre-fg rounded-[2px] px-4 py-3 overflow-x-auto [scrollbar-width:thin] [scrollbar-color:var(--color-soft)_transparent] font-mono text-[12.5px] leading-relaxed"><code>{{.Code}}</code></pre>
55+</figure>
56+{{end}}
57+
58+{{define "diff"}}
59+<div class="border-[1.5px] border-ink rounded-[2px] bg-card overflow-hidden">
60+ <div class="flex gap-3 px-4 py-2 border-b-[1.5px] border-ink text-sm"><b class="font-mono min-w-0 truncate">{{.Path}}</b><span class="ml-auto text-h4 font-semibold">+{{.Adds}}</span><span class="text-accent font-semibold">−{{.Dels}}</span></div>
61+ <div class="overflow-x-auto [scrollbar-width:thin] [scrollbar-color:var(--color-soft)_transparent] font-mono text-[12.5px] leading-relaxed">
62+ <div class="px-4 py-1 bg-empty text-soft">{{.Hunk}}</div>
63+ {{range .Lines}}<div class="grid grid-cols-[2.5rem_2.5rem_1rem_1fr] w-max min-w-full {{if eq .Op "+"}}bg-add{{else if eq .Op "-"}}bg-del{{end}}">
64+ <span class="text-right pr-2 text-soft select-none">{{if .Old}}{{.Old}}{{end}}</span><span class="text-right pr-2 text-soft select-none">{{if .New}}{{.New}}{{end}}</span>
65+ <span class="select-none font-bold">{{.Op}}</span><span class="whitespace-pre pr-4">{{.Text}}</span>
66+ </div>{{end}}
67+ </div>
68+</div>
69+{{end}}
70+
71+{{define "commit-row"}}
72+<div class="@container"><div class="grid grid-cols-[30px_minmax(0,1fr)_auto] @xl:grid-cols-[30px_12rem_5rem_minmax(0,1fr)_6rem] gap-x-3 gap-y-0.5 items-center py-1.5 border-b border-line text-[14.5px]">
73+ {{template "element" (dict "El" .El "Size" "xs")}}
74+ <b class="truncate">{{.El.Name}}</b>
75+ <code class="font-mono text-[12.5px] text-accent @xl:order-none">{{.Hash}}</code>
76+ <span class="col-start-2 col-span-2 @xl:col-auto truncate">{{.Msg}}</span>
77+ <span class="hidden @xl:block text-right text-sm text-soft">{{.Date}}</span>
78+</div></div>
79+{{end}}
internal/site/templates/index.html+1−1
@@ -1,4 +1,4 @@
1-{{define "index.html"}}{{template "head" "Overview"}}
1+{{define "index.html"}}{{template "head" "Overview"}}{{template "nav" "Overview"}}
22 <main class="px-4 sm:px-8 py-6">
33 <h1 class="text-3xl font-bold mb-4">{{len .}} projects</h1>
44 <ul>
internal/site/templates/layout.html+4−5
@@ -3,12 +3,11 @@
33 <meta charset="utf-8">
44 <meta name="viewport" content="width=device-width,initial-scale=1">
55 <title>{{.}} · xonecas.io</title>
6+<link rel="icon" href="/logo.svg" type="image/svg+xml">
7+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
8+<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans+Condensed:wght@400;600;700&family=IBM+Plex+Serif:ital@1&display=swap">
69 <link rel="stylesheet" href="/site.css">
7-<body class="bg-paper text-ink font-sans">
8-<header class="flex items-center gap-6 h-16 px-4 sm:px-8 border-b-[1.5px] border-ink">
9- <a href="/" class="font-bold text-xl">xonecas.io</a>
10- <nav class="flex gap-5 font-semibold"><a href="/">Overview</a></nav>
11-</header>
10+<body class="bg-paper text-ink font-sans text-[15.5px] leading-snug">
1211 {{end}}
1312 {{define "foot"}}</body>
1413 </html>
internal/site/templates/style.html+49−0
@@ -0,0 +1,49 @@
1+{{define "style.html"}}{{template "head" "Style"}}{{template "nav" "Style"}}
2+<main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
3+ <h1 class="text-4xl font-bold">Style</h1>
4+ <p class="font-serif italic text-soft mt-1 mb-8">02's heat wall in 20's periodic table. Light and dark, side by side.</p>
5+
6+ <h2 class="text-xl font-bold border-b-[3px] border-ink pb-1 mb-4">Colour</h2>
7+ <div class="grid gap-4 lg:grid-cols-2 mb-10">{{range $t := list "light" "dark"}}
8+ <section data-theme="{{$t}}" class="bg-paper text-ink border-[1.5px] border-ink rounded-[2px] p-4">
9+ <h3 class="font-bold mb-3">{{$t}}</h3>
10+ <div class="grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs">{{range $.Colours}}
11+ <div><div class="h-10 rounded-[2px] border border-line bg-{{.}}"></div><code class="font-mono">{{.}}</code></div>{{end}}
12+ </div>
13+ <h4 class="font-semibold mt-4 mb-1 text-sm">Groups: the tile colour</h4>
14+ <div class="flex flex-wrap items-end gap-2">{{range $.Groups}}{{template "element" (dict "El" . "Size" "sm")}}{{end}}{{template "element" (dict "El" $.Big "Size" "lg")}}</div>
15+ <h4 class="font-semibold mt-4 mb-1 text-sm">Heat: h0 empty to h6 busiest</h4>
16+ <div class="grid grid-cols-7 gap-[3px]">{{range $i, $n := $.Heat}}<div class="bg-h{{$i}} text-t{{$i}} rounded-[2px] h-8 grid place-items-center text-xs font-bold">{{$n}}</div>{{end}}</div>
17+ </section>{{end}}
18+ </div>
19+
20+ <h2 class="text-xl font-bold border-b-[3px] border-ink pb-1 mb-4">Type</h2>
21+ <div class="mb-10 space-y-2">
22+ <div class="inline-block bg-det text-det-fg text-[88px] font-bold leading-[.9] tracking-tight px-3.5 pt-2.5 pb-1.5 rounded-[2px]">2,770</div>
23+ <p class="text-4xl font-bold">IBM Plex Sans Condensed 700 · headings</p>
24+ <p class="text-xl font-semibold">Plex Sans Condensed 600 · labels, nav, tags</p>
25+ <p>Plex Sans Condensed 400 · body text, descriptions and READMEs, 15.5px.</p>
26+ <p class="font-serif italic text-lg">Plex Serif italic · one-line captions</p>
27+ <p class="font-mono text-[12.5px]">Plex Mono 12.5px · hashes, paths, code</p>
28+ </div>
29+
30+ <h2 class="text-xl font-bold border-b-[3px] border-ink pb-1 mb-4">Tags</h2>
31+ <div class="grid gap-4 lg:grid-cols-2 mb-10">{{range $t := list "light" "dark"}}
32+ <section data-theme="{{$t}}" class="bg-paper text-ink border-[1.5px] border-ink rounded-[2px] p-4 flex flex-wrap gap-2">{{range $.Tags}}{{template "tag" .}}{{end}}</section>{{end}}
33+ </div>
34+
35+ {{range $c := list "nav" "project-row" "file-tree" "code" "diff" "commit-row"}}
36+ <h2 class="text-xl font-bold border-b-[3px] border-ink pb-1 mb-4">{{$c}}</h2>
37+ <div class="grid gap-4 {{if ne $c "project-row"}}lg:grid-cols-2{{end}} mb-10">{{range $t := list "light" "dark"}}
38+ <section data-theme="{{$t}}" class="bg-paper text-ink border-[1.5px] border-ink rounded-[2px] {{if ne $c "nav"}}p-4{{end}} min-w-0">
39+ {{if eq $c "nav"}}{{template "nav" "Projects"}}
40+ {{else if eq $c "project-row"}}{{range $.Rows}}{{template "project-row" .}}{{end}}
41+ {{else if eq $c "file-tree"}}{{template "file-tree" $.Tree}}
42+ {{else if eq $c "code"}}{{template "code" $.Code}}
43+ {{else if eq $c "diff"}}{{template "diff" $.Diff}}
44+ {{else}}{{range $.Commits}}{{template "commit-row" .}}{{end}}{{end}}
45+ </section>{{end}}
46+ </div>
47+ {{end}}
48+</main>
49+{{template "foot"}}{{end}}
internal/site/view.go+47−0
@@ -0,0 +1,47 @@
1+package site
2+
3+// The view types every page template renders. The data tickets fill them from git.
4+
5+// Element is a project drawn as a periodic-table tile.
6+type Element struct {
7+ Num, Weight int // order of discovery, commit count
8+ Sym, Name string // symbol, project name
9+ Group string // fe, be, both or none: the tile colour
10+ Post bool // post-AI projects get an outline
11+}
12+
13+// ProjectRow is one project in a list.
14+type ProjectRow struct {
15+ El Element
16+ Desc, Lang string
17+ From, Width float64 // the active span, as percent of the whole timeline
18+ Heat int // 0-6, from commit count
19+ Tags []string
20+}
21+
22+// TreeEntry is one file or folder in a file tree, with its last commit.
23+type TreeEntry struct {
24+ Dir bool
25+ Name, Msg, Date string
26+}
27+
28+// Commit is one commit in a feed.
29+type Commit struct {
30+ El Element
31+ Hash, Msg, Author, Date string
32+}
33+
34+// DiffLine is one line of a unified diff. Op is "+", "-" or " ".
35+type DiffLine struct {
36+ Op string
37+ Old, New int // line numbers, 0 where the side has none
38+ Text string
39+}
40+
41+// Diff is the change to one file.
42+type Diff struct {
43+ Path string
44+ Adds, Dels int
45+ Hunk string
46+ Lines []DiffLine
47+}
tickets/1001-write-the-style-guide-for-the-chosen-direction.md+21−3
@@ -2,13 +2,13 @@
22 id: 1001
33 title: Write the style guide for the chosen direction
44 type: feature
5-status: doing
5+status: review
66 priority: p1
77 area: design
88 created: 2026-11-07T19:30:00Z
9-updated: 2026-11-08T01:09:38Z
9+updated: 2026-11-08T01:21:20Z
1010 source: agent
11-moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-07T21:43:23Z todo doing field; 2026-11-07T21:59:06Z doing blocked agent; 2026-11-08T00:49:17Z blocked todo note; 2026-11-08T00:49:25Z todo doing field; 2026-11-08T00:53:56Z doing blocked agent; 2026-11-08T00:58:33Z blocked todo note; 2026-11-08T00:58:43Z todo doing field; 2026-11-08T01:00:55Z doing blocked agent; 2026-11-08T01:08:41Z blocked todo note; 2026-11-08T01:09:38Z todo doing drag
11+moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-07T21:43:23Z todo doing field; 2026-11-07T21:59:06Z doing blocked agent; 2026-11-08T00:49:17Z blocked todo note; 2026-11-08T00:49:25Z todo doing field; 2026-11-08T00:53:56Z doing blocked agent; 2026-11-08T00:58:33Z blocked todo note; 2026-11-08T00:58:43Z todo doing field; 2026-11-08T01:00:55Z doing blocked agent; 2026-11-08T01:08:41Z blocked todo note; 2026-11-08T01:09:38Z todo doing drag; 2026-11-08T01:21:20Z doing review agent
1212 ---
1313
1414 From 1000: the contact sheet has 20 directions.
@@ -91,3 +91,21 @@ Done when: every component renders on /style at desktop and phone width (no hori
9191 DECISION NEEDED: which logo, or which mix, becomes the favicon and the top-left mark?
9292
9393 - 2026-11-08 01:08Z (human): 01 is our icon.
94+
95+- 2026-11-08 01:21Z (agent): Done: /style renders every token, tag and component in light and dark, at desktop and phone width.
96+
97+ WHAT IS ON /style (built by 'make build', served at /style/ by 'make serve'):
98+ - Colour: every token, the four group tiles, the post-AI outline, a large tile, and the 7-step heat ramp, in light and dark side by side.
99+ - Type: IBM Plex Sans Condensed 700/600/400, Plex Serif italic for captions, Plex Mono for code, and the big-number block.
100+ - Tags: each of the six has a swatch. frontend is yellow and backend is blue, like the tiles. small and big are a small and a big ink square. pre-AI is a plain tile and post-AI an outlined tile.
101+ - Components: nav, project-row, file-tree, code, diff, commit-row. Each is shown in light and dark.
102+ - Icon: 01 Heat portrait is the favicon and the nav mark, at internal/site/static/logo.svg. It is 01 as attached, with the empty cells dropped (11 kB).
103+
104+ HOW IT IS BUILT:
105+ - Tokens live in internal/site/assets/site.css as Tailwind @theme colours. Each one is light-dark(), so the page follows the system theme and data-theme=light or dark forces one. There is one token list and no dark: classes.
106+ - The components are Go template partials in templates/components.html, fed by the types in view.go. The pages for 1006, 1007 and 1009 will reuse them. The rows switch layout with container queries, so they fit whatever column they are in.
107+ - There is no JavaScript.
108+
109+ CHECKED: go vet and go test pass, and the build is idempotent. I took Firefox headless screenshots at 1440 and 390 px (attached). A check script injected into a scratch copy measured scrollWidth against the viewport: 1440/1440 and 390/390, so there is no horizontal scroll. Long code and diff lines scroll inside their own box.
110+ NOT CHECKED: Chrome or Safari. light-dark() needs a 2024+ browser.
111+ OPEN: fonts load from Google Fonts. Self-hosting them is a choice for later.
tickets/attachments/1001/style page at 1440px.png+0−0
Binary file, not shown.
tickets/attachments/1001/style page at 390px.png+0−0
Binary file, not shown.