xonecas.io
8356
Wx

www-xonecas-io / commit 3b84f21

home page: profile, wall of every month, pinned projects, and the face easter egg (1010)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 3b84f21cd560e6ce250c97a07acea232408261f5 parent 8d7af2a

11 files changed

internal/site/build.go+11−3
@@ -12,6 +12,7 @@ import (
1212 "os/exec"
1313 "path/filepath"
1414 "slices"
15+ "strconv"
1516 "strings"
1617
1718 "xonecas.io/site/internal/project"
@@ -24,8 +25,15 @@ var templates embed.FS
2425 var static embed.FS
2526
2627 var funcs = template.FuncMap{
27- "list": func(v ...any) []any { return v },
28- "lower": strings.ToLower,
28+ "list": func(v ...any) []any { return v },
29+ "lower": strings.ToLower,
30+ "comma": func(n int) string {
31+ s := strconv.Itoa(n)
32+ for i := len(s) - 3; i > 0; i -= 3 {
33+ s = s[:i] + "," + s[i:]
34+ }
35+ return s
36+ },
2937 "inc": func(i int) int { return i + 1 },
3038 "maxDiff": func() int { return MaxDiffLines },
3139 "dec": func(i int) int { return i - 1 },
@@ -67,7 +75,7 @@ func Build(projects []project.Project, out, tailwind string) error {
6775 name string
6876 data any
6977 }{
70- "index.html": {"index.html", shown},
78+ "index.html": {"index.html", homeData(shown, rows)},
7179 "projects/index.html": {"projects.html", projectsData(rows)},
7280 "style/index.html": {"style.html", styleData()},
7381 } {
internal/site/build_test.go+1−1
@@ -44,7 +44,7 @@ func TestBuild(t *testing.T) {
4444 if err != nil {
4545 t.Fatal(err)
4646 }
47- for _, want := range []string{"1 projects", "hello", "says hi"} {
47+ for _, want := range []string{"All 1 projects", "/projects/hello/", "says hi", "Every month since 2026"} {
4848 if !strings.Contains(string(page), want) {
4949 t.Errorf("index.html is missing %q", want)
5050 }
internal/site/home.go+111−0
@@ -0,0 +1,111 @@
1+package site
2+
3+import (
4+ "fmt"
5+ "slices"
6+ "strconv"
7+ "time"
8+
9+ "xonecas.io/site/internal/project"
10+)
11+
12+// Cell is one month of commits on a heat wall.
13+type Cell struct {
14+ Month string // YYYY-MM
15+ Count, Heat int
16+}
17+
18+// WallYear is one row of the heat wall.
19+type WallYear struct {
20+ Year string
21+ Cells []Cell
22+}
23+
24+// Pinned is a project card on the home page, with its months of the latest year.
25+type Pinned struct {
26+ Row ProjectRow
27+ P project.Project
28+ Strip []Cell
29+}
30+
31+// HomeData is the home page: totals, the wall of every month, and the busiest projects of the latest year.
32+type HomeData struct {
33+ Commits, Projects, Languages int
34+ Busiest, Quietest, Year string
35+ Wall []WallYear
36+ Pinned []Pinned
37+ Tags []string
38+}
39+
40+// level is the heat of a commit count, 0 to 6.
41+func level(n int) (h int) {
42+ for _, t := range heat {
43+ if n >= t {
44+ h++
45+ }
46+ }
47+ return h
48+}
49+
50+// months is the cells of year from per-month counts.
51+func months(year string, counts map[string]int) []Cell {
52+ cells := make([]Cell, 12)
53+ for i := range cells {
54+ m := fmt.Sprintf("%s-%02d", year, i+1)
55+ cells[i] = Cell{m, counts[m], level(counts[m])}
56+ }
57+ return cells
58+}
59+
60+func homeData(shown []project.Project, rows []ProjectRow) HomeData {
61+ d := HomeData{Projects: len(shown), Tags: []string{"frontend", "backend", "small", "big", "pre-AI", "post-AI"}}
62+ all, langs, first, last := map[string]int{}, map[string]bool{}, "9999", "0000"
63+ for _, p := range shown {
64+ d.Commits += p.Commits
65+ for m, n := range p.Months {
66+ all[m] += n
67+ }
68+ if len(p.Languages) > 0 {
69+ langs[p.Languages[0].Name] = true
70+ }
71+ first, last = min(first, p.First[:4]), max(last, p.Last[:4])
72+ }
73+ d.Languages, d.Year = len(langs), last
74+ busiest, quiet, quietN := "", "", -1
75+ for y := mustAtoi(first); y <= mustAtoi(last); y++ {
76+ year := strconv.Itoa(y)
77+ row := WallYear{year, months(year, all)}
78+ total := 0
79+ for _, c := range row.Cells {
80+ total += c.Count
81+ if busiest == "" || c.Count > all[busiest] {
82+ busiest = c.Month
83+ }
84+ }
85+ if quietN < 0 || total < quietN {
86+ quiet, quietN = year, total
87+ }
88+ d.Wall = append(d.Wall, row)
89+ }
90+ t, _ := time.Parse("2006-01", busiest)
91+ d.Busiest = fmt.Sprintf("%s · %d", t.Format("Jan 2006"), all[busiest])
92+ d.Quietest = fmt.Sprintf("%s · %d", quiet, quietN)
93+
94+ for i, p := range shown {
95+ d.Pinned = append(d.Pinned, Pinned{rows[i], p, months(last, p.Months)})
96+ }
97+ inYear := func(p Pinned) (n int) {
98+ for _, c := range p.Strip {
99+ n += c.Count
100+ }
101+ return n
102+ }
103+ slices.SortStableFunc(d.Pinned, func(a, b Pinned) int { return inYear(b) - inYear(a) })
104+ d.Pinned = d.Pinned[:min(6, len(d.Pinned))]
105+ return d
106+}
107+
108+func mustAtoi(s string) int {
109+ n, _ := strconv.Atoi(s)
110+ return n
111+}
internal/site/static/egg.js+9−0
@@ -0,0 +1,9 @@
1+// Ten clicks on the face within ten seconds open the game. On the home page the clicks stay put.
2+const face = document.getElementById("face"), clicks = [];
3+face?.addEventListener("click", e => {
4+ if (location.pathname !== "/") return;
5+ e.preventDefault();
6+ clicks.push(Date.now());
7+ while (clicks[0] < Date.now() - 10000) clicks.shift();
8+ if (clicks.length >= 10) location.href = "https://space-browser.xonecas.io/";
9+});
internal/site/templates/components.html+2−2
@@ -2,9 +2,9 @@
22
33 {{define "nav"}}
44 <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>
5+ <a href="/" id="face" 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>
66 <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}}
7+ {{range $l := list "Overview" "Projects"}}<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}}
88 </nav>
99 <form action="/projects/" class="w-full sm:w-auto sm:ml-auto"><input name="q" placeholder="Search 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>
1010 </header>
internal/site/templates/index.html+30−7
@@ -1,10 +1,33 @@
11 {{define "index.html"}}{{template "head" "Overview"}}{{template "nav" "Overview"}}
2-<main class="px-4 sm:px-8 py-6">
3- <h1 class="text-3xl font-bold mb-4">{{len .}} projects</h1>
4- <ul>
5- {{range .}}<li class="py-2 border-b border-line">
6- <b>{{.Name}}</b> <span class="text-soft">· {{.Commits}} commits · {{.Last}} · {{.Description}}</span>
7- </li>{{end}}
8- </ul>
2+<main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto grid grid-cols-1 lg:grid-cols-[17rem_minmax(0,1fr)] gap-x-10 gap-y-8">
3+ <aside>
4+ <div class="inline-block bg-det text-det-fg text-[64px] font-bold leading-[.9] tracking-tight px-3 pt-2 pb-1 rounded-[2px]">{{comma .Commits}}</div>
5+ <h1 class="text-2xl font-bold mt-3">Sean Caetano Martin</h1>
6+ <p class="text-sm text-soft">xonecas · sacenox</p>
7+ <p class="mt-3 text-sm">Every project I have made public since {{(index .Wall 0).Year}}, in one place. Browse it, clone it, it is all read-only.</p>
8+ <dl class="mt-4 text-sm">
9+ {{range list (list "Projects" .Projects) (list "Commits" (comma .Commits)) (list "Languages" .Languages) (list "Busiest month" .Busiest) (list "Quietest year" .Quietest)}}
10+ <div class="flex justify-between py-1.5 border-b border-line"><dt>{{index . 0}}</dt><dd class="font-bold">{{index . 1}}</dd></div>{{end}}
11+ </dl>
12+ <div class="flex flex-wrap gap-1 mt-4">{{range .Tags}}<a href="/projects/?tag={{.}}" class="flex no-underline">{{template "tag" .}}</a>{{end}}</div>
13+ </aside>
14+ <div class="min-w-0">
15+ <div class="flex items-baseline justify-between mb-2"><h2 class="font-bold text-lg">Every month since {{(index .Wall 0).Year}}</h2><span class="text-xs text-soft">one cell = one month of commits</span></div>
16+ <div class="grid grid-cols-[2.25rem_repeat(12,minmax(0,1fr))] gap-[3px] text-[11px]">
17+ <span></span>{{range list "J" "F" "M" "A" "M" "J" "J" "A" "S" "O" "N" "D"}}<span class="text-center text-soft">{{.}}</span>{{end}}
18+ {{range .Wall}}<b class="leading-4">{{.Year}}</b>{{range .Cells}}<span class="h-4 rounded-[2px] bg-h{{.Heat}}" title="{{.Month}}: {{.Count}} commits"></span>{{end}}
19+ {{end}}
20+ </div>
21+ <div class="flex items-baseline justify-between mt-8 mb-2"><h2 class="font-bold text-lg">Pinned</h2><span class="text-xs text-soft">busiest in {{.Year}}, by month</span></div>
22+ <div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">{{range .Pinned}}
23+ <a href="/projects/{{.P.Name}}/" class="block border-[1.5px] border-ink rounded-[2px] bg-card p-3 no-underline hover:bg-empty">
24+ <div class="flex items-center gap-3">{{template "element" (dict "El" .Row.El "Size" "sm")}}<b class="text-lg truncate">{{.P.Name}}</b><span class="ml-auto text-xs text-soft">{{.Row.Lang}}</span></div>
25+ <p class="mt-2 text-sm text-soft line-clamp-2 min-h-10">{{or .P.Description "No description"}}</p>
26+ <div class="grid grid-cols-12 gap-[2px] mt-2">{{range .Strip}}<span class="h-2.5 rounded-[1px] bg-h{{.Heat}}" title="{{.Month}}: {{.Count}}"></span>{{end}}</div>
27+ <p class="mt-2 text-xs text-soft">{{.P.Commits}} commits · {{.P.Stars}} stars · {{range $i, $t := .P.Tags}}{{if $i}} {{end}}{{$t}}{{end}}</p>
28+ </a>{{end}}
29+ </div>
30+ <p class="mt-4 font-semibold"><a href="/projects/">All {{.Projects}} projects →</a></p>
31+ </div>
932 </main>
1033 {{template "foot"}}{{end}}
internal/site/templates/layout.html+1−0
@@ -7,6 +7,7 @@
77 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
88 <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">
99 <link rel="stylesheet" href="/site.css">
10+<script src="/egg.js" defer></script>
1011 <body class="bg-paper text-ink font-sans text-[15.5px] leading-snug">
1112 {{end}}
1213 {{define "foot"}}</body>
tickets/1010-build-the-xonecas-io-homepage.md+21−3
@@ -2,13 +2,13 @@
22 id: 1010
33 title: Build the xonecas.io homepage
44 type: feature
5-status: doing
5+status: review
66 priority: p1
77 area: site
88 created: 2026-11-07T19:30:00Z
9-updated: 2026-11-08T01:42:00Z
9+updated: 2026-11-08T01:59:23Z
1010 source: agent
11-moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-08T01:09:31Z todo doing drag; 2026-11-08T01:38:14Z doing blocked agent; 2026-11-08T01:40:47Z blocked todo note; 2026-11-08T01:42:00Z todo doing drag
11+moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-08T01:09:31Z todo doing drag; 2026-11-08T01:38:14Z doing blocked agent; 2026-11-08T01:40:47Z blocked todo note; 2026-11-08T01:42:00Z todo doing drag; 2026-11-08T01:59:23Z doing review agent
1212 ---
1313
1414 The home page: who this is, a way into /projects, and links to the game and chat. Those stay as they are: space-browser.xonecas.io and irvc.xonecas.io. No changes to either.
@@ -32,3 +32,21 @@ Done when: all links work locally and the page matches the style guide at deskto
3232 What I'd build once answered, from the style guide: bio, the all-history heat wall (your commits per month since 2011), the stat block (81 projects · 2,7xx commits), the latest commits, and a link into /projects.
3333
3434 - 2026-11-08 01:40Z (human): Decision: IRVC is private and should not be shared publicly in the site. It's an invite only chat. the space browser game we can hide as a easter egg, like clicking on my face on the top right 10 times in 10 seconds, navigates to it.
35+
36+- 2026-11-08 01:59Z (agent): Done, following the 02/20 overview mock: profile and stats on the left, the wall of every month since 2011, and six pinned projects with their 2026 months. Light, dark and phone screenshots are attached.
37+
38+ YOUR DECISION, BUILT:
39+ - irvc appears nowhere on the site.
40+ - space-browser is the easter egg: 10 clicks on your face (the logo) within 10 seconds opens https://space-browser.xonecas.io/. On the home page the clicks don't reload the page. On other pages the face is a normal link home. The logo sits top LEFT in the nav, not top right, so that's where the egg is. Say if you want a face top right instead.
41+
42+ STILL OPEN, BUILT WITH THE SAFE DEFAULT. Each is a one-line change:
43+ 1. Bio: I wrote none. The page shows 'Sean Caetano Martin', 'xonecas · sacenox' and the line from the approved mock: 'Every project I have made public since 2011, in one place. Browse it, clone it, it is all read-only.' Send bio text and I'll put it under the name.
44+ 2. 'request to...': nothing built.
45+ 3. /mini-coding-agent: no link. The project has its own page.
46+
47+ FROM THE DATA: 2,717 of your commits, 81 projects, 12 primary languages, busiest month Feb 2026 (625), quietest year 2019 (0). Pinned = the six projects with the most commits in the latest year (mini-coder, Zoea-Nova, cel-tui, symb, mini-coding-agent, dotfiles). The tag chips open /projects filtered by that tag.
48+
49+ CHANGED OUTSIDE THE TICKET: I removed 'Activity' from the nav. No ticket builds /activity, so it was a dead link, and 'all links work' fails with it. It comes back with a ticket for that page.
50+
51+ CHECKED: every link on the home page returns 200 locally (17 internal). No overflow at 390px. Screenshots in light and dark. The egg is unit-tested in Node with a stubbed DOM: 9 clicks stay, 10 within 10s go, 10 spread over 12s stay, and other pages are untouched.
52+ NOT CHECKED: a real click-through of the egg in a browser. Headless Firefox screenshots before a click script can run, so I tested the logic instead.
tickets/attachments/1010/home, dark.png+0−0
Binary file, not shown.
tickets/attachments/1010/home, light.png+0−0
Binary file, not shown.
tickets/attachments/1010/home, phone, no overflow.png+0−0
Binary file, not shown.