Commit 9e5d26315f

9e5d26315f785e2d5c5aa83ab281314a75290947

parent: 34c027c041

Verified · cmc ci/build: success ci/quality: success ci/test: success ci/vuln: success

cmc <hello@cleberg.net> · 2026-11-08 00:59 UTC

Align repository rows by column

The reporow partial on the repositories tab and /explore is a subgrid
of the list: name, labels, description, topics, branch, license and
updated each have one column across every row. Cells pad instead of
using a gap, so a column no row fills takes no width. Below 62rem the
rows stack as before, with the separators drawn in CSS.

Closes #347

Layout: unified · split

internal/web/static/style.css +20 −6
@@ -1033,11 +1033,22 @@ ul.repolist .reponame .sep { color: var(--muted); margin: 0 2px; }
10331033ul.repolist .desc { margin-top: 2px; }
10341034ul.repolist .topics, ul.repolist .meta { margin-top: var(--sp-1); }
10351035
1036ul.repolist.rows li { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); }
1037ul.repolist.rows .reponame { flex: none; font-size: var(--fs-2); }
1038ul.repolist.rows .desc { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--fs-2); margin: 0; }
1039ul.repolist.rows .topics, ul.repolist.rows .meta { flex: none; margin: 0; white-space: nowrap; }
1040ul.repolist.rows .meta { font-size: var(--fs-1); }
1036/* one column per field across every row: name, labels, description,
1037 topics, branch, license, updated. Rows are subgrids of the list;
1038 the name and meta paragraphs are display: contents so their parts
1039 are cells. Cells pad instead of a gap, so an empty column is 0 wide. */
1040ul.repolist.rows { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto auto; }
1041ul.repolist.rows li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; padding: var(--sp-2) var(--sp-4); }
1042ul.repolist.rows li > *, ul.repolist.rows .reponame > *, ul.repolist.rows .meta > * { grid-row: 1; padding-left: var(--sp-3); white-space: nowrap; }
1043ul.repolist.rows .reponame, ul.repolist.rows .meta { display: contents; }
1044ul.repolist.rows .reponame .name { grid-column: 1; padding-left: 0; font-size: var(--fs-2); }
1045ul.repolist.rows .labels { grid-column: 2; }
1046ul.repolist.rows .desc { grid-column: 3; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--fs-2); margin: 0; }
1047ul.repolist.rows .topics { grid-column: 4; margin: 0; }
1048ul.repolist.rows .branch { grid-column: 5; }
1049ul.repolist.rows .license { grid-column: 6; }
1050ul.repolist.rows .updated { grid-column: 7; }
1051ul.repolist.rows li.empty { display: block; }
10411052
10421053/* pinned repos: a compact wrap of names, no description or meta */
10431054ul.pinlist { list-style: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@@ -1850,8 +1861,11 @@ svg.icon { vertical-align: -0.125em; }
18501861 .withaside { grid-template-columns: 1fr; }
18511862
18521863 /* rows go back to two lines where one does not fit */
1853 ul.issuelist.rows .issuemain, ul.repolist.rows li, ul.loglist.rows .commitmain { display: block; }
1864 ul.issuelist.rows .issuemain, ul.repolist.rows, ul.repolist.rows li, ul.loglist.rows .commitmain { display: block; }
18541865 ul.issuelist.rows .title, ul.repolist.rows .desc { white-space: normal; }
1866 ul.repolist.rows .reponame, ul.repolist.rows .meta { display: block; }
1867 ul.repolist.rows li > *, ul.repolist.rows .reponame > *, ul.repolist.rows .meta > * { padding-left: 0; white-space: normal; }
1868 ul.repolist.rows .license::before, ul.repolist.rows .updated::before { content: " · "; }
18551869 /* a nowrap meta or topic line on one of these rows forces horizontal
18561870 page scroll on a phone: a long branch name, a long owner/repo#N */
18571871 ul.issuelist.rows .meta, ul.loglist.rows .meta,
internal/web/templates/layout.html +2 −2
@@ -124,10 +124,10 @@
124124{{define "width"}}reading{{end}}
125125
126126{{define "reporow"}}<li>
127 <p class="reponame"><a href="/{{.OwnerName}}/{{.Name}}">{{.OwnerName}}<span class="sep">/</span><strong>{{.Name}}</strong></a>{{if eq .Visibility "private"}} <span class="chip">Private</span>{{end}}{{if .Archived}} <span class="chip">Archived</span>{{end}}</p>
127 <p class="reponame"><a class="name" href="/{{.OwnerName}}/{{.Name}}">{{.OwnerName}}<span class="sep">/</span><strong>{{.Name}}</strong></a>{{if or (eq .Visibility "private") .Archived}} <span class="labels">{{if eq .Visibility "private"}}<span class="chip">Private</span>{{end}}{{if .Archived}} <span class="chip">Archived</span>{{end}}</span>{{end}}</p>
128128 {{if .Desc}}<p class="desc">{{.Desc}}</p>{{end}}
129129 {{if .Topics}}<p class="topics">{{range .Topics}}<a class="chip topic" href="/explore?q={{.}}">{{.}}</a> {{end}}</p>{{end}}
130 <p class="meta">{{template "branchicon"}} {{.DefaultBranch}}{{if .License}} · {{.License}}{{end}}{{if .Updated}} · updated {{.Updated}}{{end}}</p>
130 <p class="meta"><span class="branch">{{template "branchicon"}} {{.DefaultBranch}}</span>{{if .License}}<span class="license">{{.License}}</span>{{end}}{{if .Updated}}<span class="updated">updated {{.Updated}}</span>{{end}}</p>
131131</li>{{end}}
132132
133133{{define "refmenu"}}{{if .Branches}}<details class="refmenu">