Commit 85130480d7
85130480d73a6cbc7827a6e16599f9c789551164
parent: 7c4afe2c80
Verified · cmc
cmc <hello@cleberg.net> · 2026-09-19 23:57 UTC
web: every pre block takes focus
A pre scrolls sideways, which makes it a scrollable region: without a
focusable child a keyboard cannot reach a blame view, a build log or a
search match. The rendered-markup blocks already get the attribute from
focusableBlocks; the authored ones now carry it too.
Ref #226
internal/web/templates/account.html
+1 −1
| @@ -163,7 +163,7 @@ never included; a replayed bundle's emails arrive unverified.</p> |
| 163 | 163 | <section id="cli"><h2>On the command line</h2> |
| 164 | 164 | <p class="meta">No page here yet, and nothing refusing one: a credential is |
| 165 | 165 | easier to pipe than to paste, and a minted token is shown once.</p> |
| 166 | | <pre class="message">gitbay auth token create --name laptop # API tokens |
| 166 | <pre class="message" tabindex="0">gitbay auth token create --name laptop # API tokens |
| 167 | 167 | gitbay web sessions list # browser sessions |
| 168 | 168 | gitbay admin ... # instance administration</pre> |
| 169 | 169 | <p class="meta">All of it works from stock OpenSSH too: |
internal/web/templates/blame.html
+1 −1
| @@ -19,7 +19,7 @@ |
| 19 | 19 | <p class="subject"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.SHA}}">{{.Summary}}</a></p> |
| 20 | 20 | <p class="meta"><code><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.SHA}}">{{.ShortSHA}}</a></code> <span title="{{.AuthorEmail}}">{{.AuthorName}}</span> · {{when .Date}} {{template "sigbadge" .Sig}}</p> |
| 21 | 21 | </div> |
| 22 | | <pre class="blamecode">{{range .Numbered}}<span class="lineno">{{.N}}</span>{{.Text}} |
| 22 | <pre class="blamecode" tabindex="0">{{range .Numbered}}<span class="lineno">{{.N}}</span>{{.Text}} |
| 23 | 23 | {{end}}</pre> |
| 24 | 24 | </div> |
| 25 | 25 | {{else}}<p class="empty-note">empty file</p>{{end}} |
internal/web/templates/build.html
+1 −1
| @@ -12,5 +12,5 @@ |
| 12 | 12 | {{end}} |
| 13 | 13 | </div> |
| 14 | 14 | <p class="meta">{{.Build.Job}} on {{.Build.Ref}} · <code><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/commit/{{.Build.SHA}}">{{printf "%.10s" .Build.SHA}}</a></code> · queued {{when .Build.CreatedAt}}{{if .Build.FinishedAt}} · finished {{when .Build.FinishedAt}}{{end}}</p> |
| 15 | | {{if .Log}}<pre class="code buildlog">{{.Log}}</pre>{{else}}<p class="empty-note">no log yet</p>{{end}} |
| 15 | {{if .Log}}<pre class="code buildlog" tabindex="0">{{.Log}}</pre>{{else}}<p class="empty-note">no log yet</p>{{end}} |
| 16 | 16 | {{end}} |
internal/web/templates/builds.html
+1 −1
| @@ -32,7 +32,7 @@ |
| 32 | 32 | {{end}} |
| 33 | 33 | <details class="editbox"><summary>Status badge</summary> |
| 34 | 34 | <p class="meta">Paste into a README; it shows the newest build's state.</p> |
| 35 | | <pre class="code">[](https://{{.Host}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds)</pre> |
| 35 | <pre class="code" tabindex="0">[](https://{{.Host}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds)</pre> |
| 36 | 36 | <p class="meta">Add <code>?job=name</code> for one job.</p> |
| 37 | 37 | </details> |
| 38 | 38 | <p class="meta">{{len .Runs}} run{{if ne (len .Runs) 1}}s{{end}}{{if or .Filter.Ref .Filter.Status .Filter.Job}}, <a href="?">clear filters</a>{{end}}</p> |
internal/web/templates/commit.html
+1 −1
| @@ -9,7 +9,7 @@ |
| 9 | 9 | <p class="meta">{{template "authorname" dict "Name" .AuthorName "User" .AuthorUser "Email" .AuthorEmail}} <{{.AuthorEmail}}> · {{when .Date}} |
| 10 | 10 | {{if .CommitterEmail}}<br>committer: <{{.CommitterEmail}}>{{end}}</p> |
| 11 | 11 | </div> |
| 12 | | <pre class="message">{{.Message}}</pre> |
| 12 | <pre class="message" tabindex="0">{{.Message}}</pre> |
| 13 | 13 | {{if .DiffTruncated}}<p class="error" role="alert">This patch is larger than 4 MiB and is cut off below. Clone the repository to see all of it.</p>{{end}} |
| 14 | 14 | {{template "difffiles" dict "Files" .DiffFiles "Base" "" "Viewer" ""}} |
| 15 | 15 | {{end}} |
internal/web/templates/login.html
+3 −3
| @@ -19,16 +19,16 @@ expires in fifteen minutes.</p> |
| 19 | 19 | <p>Browser sessions are minted over SSH — there is no password. From a machine |
| 20 | 20 | with your registered key:</p> |
| 21 | 21 | {{end}} |
| 22 | | <pre class="message">ssh git@{{.Host}} web login</pre> |
| 22 | <pre class="message" tabindex="0">ssh git@{{.Host}} web login</pre> |
| 23 | 23 | <p>then open the printed URL within five minutes.</p> |
| 24 | 24 | {{end}} |
| 25 | 25 | <h2>New here?</h2> |
| 26 | 26 | {{if eq .Mode "open"}}<p><a href="/register">Create an account</a> — pick a username, paste your SSH |
| 27 | 27 | public key, verify your email. Or from the terminal:</p> |
| 28 | | <pre class="message">ssh git@{{.Host}} register --username you --email you@example.org</pre> |
| 28 | <pre class="message" tabindex="0">ssh git@{{.Host}} register --username you --email you@example.org</pre> |
| 29 | 29 | {{else if eq .Mode "invite"}}<p>This instance is invite-only. With a code from an admin, |
| 30 | 30 | <a href="/register">create an account</a> — pick a username, paste your SSH public key. Or from |
| 31 | 31 | the terminal:</p> |
| 32 | | <pre class="message">ssh git@{{.Host}} register --username you --invite <code></pre> |
| 32 | <pre class="message" tabindex="0">ssh git@{{.Host}} register --username you --invite <code></pre> |
| 33 | 33 | {{else}}<p>This instance is not accepting new accounts.</p>{{end}} |
| 34 | 34 | {{end}} |
internal/web/templates/owner.html
+1 −1
| @@ -128,6 +128,6 @@ of a team get its role on every repository it is granted.</p> |
| 128 | 128 | </details> |
| 129 | 129 | <p class="meta">Deleting an organization is a CLI operation, like deleting a |
| 130 | 130 | repository: it wants a typed confirmation rather than a button.</p> |
| 131 | | <pre class="message">gitbay org delete {{$org}} --yes</pre> |
| 131 | <pre class="message" tabindex="0">gitbay org delete {{$org}} --yes</pre> |
| 132 | 132 | {{end}} |
| 133 | 133 | {{end}} |
internal/web/templates/registered.html
+2 −2
| @@ -3,13 +3,13 @@ |
| 3 | 3 | {{define "content"}} |
| 4 | 4 | <div class="landing"> |
| 5 | 5 | <h1>Welcome, {{.Username}}</h1> |
| 6 | | <pre class="quickstart">{{.Message}}</pre> |
| 6 | <pre class="quickstart" tabindex="0">{{.Message}}</pre> |
| 7 | 7 | <h2>On the web</h2> |
| 8 | 8 | <p>Check your mail for the code, <a href="/login">sign in</a> with an emailed |
| 9 | 9 | link, and paste the code under <a href="/settings">Settings</a>. Then + |
| 10 | 10 | creates your first repository.</p> |
| 11 | 11 | <h2>From the terminal</h2> |
| 12 | | <pre class="quickstart">ssh git@{{.Host}} whoami |
| 12 | <pre class="quickstart" tabindex="0">ssh git@{{.Host}} whoami |
| 13 | 13 | ssh git@{{.Host}} repo create {{.Username}}/hello |
| 14 | 14 | gitbay web login # mints a browser session from your terminal</pre> |
| 15 | 15 | </div> |
internal/web/templates/search.html
+1 −1
| @@ -13,7 +13,7 @@ |
| 13 | 13 | <ul class="matchlist"> |
| 14 | 14 | {{range .Matches}}<li> |
| 15 | 15 | <a class="matchpath" href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/blob/{{$.Ref}}/{{.Path}}#L{{.Line}}">{{.Path}}:{{.Line}}</a> |
| 16 | | <pre class="matchline">{{.TextHTML}}</pre> |
| 16 | <pre class="matchline" tabindex="0">{{.TextHTML}}</pre> |
| 17 | 17 | </li> |
| 18 | 18 | {{end}} |
| 19 | 19 | </ul> |
internal/web/templates/tree.html
+2 −2
| @@ -50,8 +50,8 @@ |
| 50 | 50 | </div>{{end}} |
| 51 | 51 | <div class="clone"> |
| 52 | 52 | <h2>Clone</h2> |
| 53 | | <span class="fieldname">SSH</span><pre><code>git clone {{.SSHCloneURL}}</code></pre> |
| 54 | | <span class="fieldname">HTTPS</span><pre><code>git clone {{.CloneURL}}</code></pre> |
| 53 | <span class="fieldname">SSH</span><pre tabindex="0"><code>git clone {{.SSHCloneURL}}</code></pre> |
| 54 | <span class="fieldname">HTTPS</span><pre tabindex="0"><code>git clone {{.CloneURL}}</code></pre> |
| 55 | 55 | </div> |
| 56 | 56 | </div>{{end}} |
| 57 | 57 | </div> |