Commit f8b1aa4b9d
f8b1aa4b9df0a0689bc20de8251b66dbd033873b
parent: 317281df21
Verified · cmc
cmc <hello@cleberg.net> · 2026-09-18 04:28 UTC
web: repositories above the biography on the profile page
The repolist block moves directly after profilehead, before the About
section, so a visitor sees what a user or org has built before their
write-up.
Ref #225
e2e/profile_test.go
+3
| @@ -214,6 +214,9 @@ func TestOwnerProfiles(t *testing.T) { |
| 214 | 214 | if strings.Index(body, "<em>small tools</em>") > strings.Index(body, `class="activity"`) { |
| 215 | 215 | t.Error("about renders below the activity graph") |
| 216 | 216 | } |
| 217 | if strings.Index(body, `<ul class="repolist"`) > strings.Index(body, "<em>small tools</em>") { |
| 218 | t.Error("repositories render below the about section") |
| 219 | } |
| 217 | 220 | |
| 218 | 221 | // Clearing works the same way as the other fields. |
| 219 | 222 | if _, _, code := inst.ssh(t, aliceKey, "", "profile", "set", "--link", "''"); code != 0 { |
internal/web/templates/owner.html
+5 −5
| @@ -9,6 +9,11 @@ |
| 9 | 9 | {{if .Members}}<p class="meta">members {{range .Members}}<a class="memberchip" href="/{{.Name}}">{{.Name}} <span class="role">{{.Role}}</span></a> {{end}}</p>{{end}} |
| 10 | 10 | {{if and (eq .Kind "org") .Repos}}<p class="meta"><a href="/{{.Owner}}/-/labels">labels</a> · <a href="/{{.Owner}}/-/milestones">milestones</a></p>{{end}} |
| 11 | 11 | </section> |
| 12 | <h2>repositories <span class="count">{{len .Repos}}</span></h2> |
| 13 | <ul class="repolist"> |
| 14 | {{range .Repos}}{{template "reporow" .}} |
| 15 | {{else}}<li class="empty">no visible repositories</li>{{end}} |
| 16 | </ul> |
| 12 | 17 | {{if .AboutHTML}}<section class="readme"><div class="rendered">{{.AboutHTML}}</div></section>{{end}} |
| 13 | 18 | <section class="activity"> |
| 14 | 19 | <h2>activity <span class="count">{{.ActivityTotal}} in the last year</span></h2> |
| @@ -18,11 +23,6 @@ |
| 18 | 23 | </div> |
| 19 | 24 | </div> |
| 20 | 25 | </section> |
| 21 | | <h2>repositories <span class="count">{{len .Repos}}</span></h2> |
| 22 | | <ul class="repolist"> |
| 23 | | {{range .Repos}}{{template "reporow" .}} |
| 24 | | {{else}}<li class="empty">no visible repositories</li>{{end}} |
| 25 | | </ul> |
| 26 | 26 | {{if or .Snippets .Self}}<p class="meta"><a href="/{{.Owner}}/-/snippets">snippets{{if .Snippets}} <span class="count">{{.Snippets}}</span>{{end}}</a></p>{{end}} |
| 27 | 27 | |
| 28 | 28 | {{if .Self}} |