Commit 3fa8d16dc1

3fa8d16dc1a5abfd57749720f17606760036ccbb

parent: 5daf169d25

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-17 15:21 UTC

web: button treatments, explicit search buttons, sentence case

Ref #218
internal/web/templates/account.html +10 −10
@@ -17,7 +17,7 @@
1717 <label for="p-about">About</label>
1818 <textarea id="p-about" name="about" rows="8" placeholder="longer, shown below your repositories">{{.Profile.About}}</textarea>
1919 {{template "formatpicker" .Profile.AboutFormat}}
20 <button type="submit">Save profile</button>
20 <button type="submit" class="btn">Save profile</button>
2121</form>
2222
2323<h2>SSH keys</h2>
@@ -31,7 +31,7 @@ a CI checkout wants.</p>
3131 <td class="mono">{{.Fingerprint}}</td>
3232 <td>{{.Algo}}</td>
3333 <td>{{.Scope}}</td>
34 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="key-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="linklike">Remove</button></form></td>
34 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="key-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="danger">Remove</button></form></td>
3535</tr>
3636{{end}}</table></div>
3737{{else}}<p class="none">No SSH keys — which cannot be right, since you signed in.</p>{{end}}
@@ -48,7 +48,7 @@ a CI checkout wants.</p>
4848 <option value="full">full — commands and git</option>
4949 <option value="git">git — git transport only</option>
5050 </select>
51 <button type="submit">Add key</button>
51 <button type="submit" class="btn">Add key</button>
5252 </form>
5353</details>
5454
@@ -61,7 +61,7 @@ account, and where notifications go.</p>
6161 {{if .Verified}}<span class="badge badge-verified">verified{{with .VerifiedBy}} · {{.}}{{end}}</span>
6262 {{else}}<span class="badge badge-unsigned">unverified</span>{{end}}
6363 {{if not .Primary}}{{if .Verified}}<form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-primary"><input type="hidden" name="address" value="{{.Address}}"><button type="submit" class="linklike">Make primary</button></form>{{end}}
64 <form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-remove"><input type="hidden" name="address" value="{{.Address}}">{{template "confirmfield" .Address}} <button type="submit" class="linklike">Remove</button></form>{{end}}</li>
64 <form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-remove"><input type="hidden" name="address" value="{{.Address}}">{{template "confirmfield" .Address}} <button type="submit" class="danger">Remove</button></form>{{end}}</li>
6565{{end}}</ul>{{end}}
6666<details class="editbox">
6767 <summary>Add an address</summary>
@@ -69,13 +69,13 @@ account, and where notifications go.</p>
6969 <input type="hidden" name="field" value="email-add">
7070 <label for="address">Address</label>
7171 <input type="email" id="address" name="address" required placeholder="you@example.org">
72 <button type="submit">Send code</button>
72 <button type="submit" class="btn">Send code</button>
7373 </form>
7474 <form method="post" action="/settings" class="setform">
7575 <input type="hidden" name="field" value="email-verify">
7676 <label for="code">Verification code</label>
7777 <input type="text" id="code" name="code" required placeholder="from the mail">
78 <button type="submit">Verify</button>
78 <button type="submit" class="btn">Verify</button>
7979 </form>
8080</details>
8181
@@ -87,7 +87,7 @@ account, and where notifications go.</p>
8787{{range .PGP}}<tr>
8888 <td class="mono">{{.Fingerprint}}</td>
8989 <td>{{range .UIDs}}{{.}}<br>{{end}}{{if .Revoked}}<span class="badge badge-bad_signature">revoked</span>{{else if .Expired}}<span class="badge badge-signed_key_expired">expired</span>{{end}}</td>
90 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="pgp-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="linklike">Remove</button></form></td>
90 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="pgp-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="danger">Remove</button></form></td>
9191</tr>
9292{{end}}</table></div>
9393{{else}}<p class="none">No OpenPGP keys.</p>{{end}}
@@ -97,7 +97,7 @@ account, and where notifications go.</p>
9797 <input type="hidden" name="field" value="pgp-add">
9898 <label for="pgpkey">Armored public key</label>
9999 <textarea id="pgpkey" name="key" rows="6" required placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----"></textarea>
100 <button type="submit">Add key</button>
100 <button type="submit" class="btn">Add key</button>
101101 </form>
102102</details>
103103
@@ -106,14 +106,14 @@ account, and where notifications go.</p>
106106 <input type="hidden" name="field" value="notify-mail">
107107 <label for="notify-mail">Activity by mail</label>
108108 <input type="checkbox" id="notify-mail" name="mail" value="on"{{if .MailOn}} checked{{end}}>
109 <button type="submit">Save</button>
109 <button type="submit" class="btn">Save</button>
110110</form>
111111<p class="meta">The inbox is filed either way; this is the mail half. Login links are not activity and still arrive.</p>
112112<form method="post" action="/settings" class="setform">
113113 <input type="hidden" name="field" value="notify-watch">
114114 <label for="notify-watch">Watch repositories you can write to</label>
115115 <input type="checkbox" id="notify-watch" name="watch" value="on"{{if .WatchOn}} checked{{end}}>
116 <button type="submit">Save</button>
116 <button type="submit" class="btn">Save</button>
117117</form>
118118<p class="meta">Every issue and merge request on those repositories, as if you had watched each. A watch or mute on a repository still wins.</p>
119119
internal/web/templates/build.html +1 −1
@@ -6,7 +6,7 @@
66<span class="spacer"></span>
77{{if and .CanWrite (or (eq .Build.Status "pending") (eq .Build.Status "running"))}}
88<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds/{{.Build.Number}}/cancel" class="actions">
9 <button type="submit">{{if eq .Build.Status "running"}}Cancel (stops at the runner's next check){{else}}Cancel{{end}}</button>
9 <button type="submit" class="btn">{{if eq .Build.Status "running"}}Cancel (stops at the runner's next check){{else}}Cancel{{end}}</button>
1010</form>
1111{{end}}
1212</div>
internal/web/templates/builds.html +1 −1
@@ -8,7 +8,7 @@
88 <select id="job" name="job">
99 {{range .Jobs}}<option value="{{.Name}}">{{.Name}}{{if .Schedule}} (schedule {{.Schedule}}){{else if .Tags}} (tags {{.Tags}}){{end}}</option>{{end}}
1010 </select>
11 <button type="submit">Run</button>
11 <button type="submit" class="btn">Run</button>
1212</form>
1313{{end}}
1414<details class="editbox"><summary>Status badge</summary>
internal/web/templates/explore.html +1
@@ -4,6 +4,7 @@
44<h1>Explore</h1>
55<form method="get" action="/explore" class="searchform compact">
66 <input type="search" name="q" aria-label="Filter repositories" value="{{.Query}}" placeholder="filter by name, description, topic">
7 <button type="submit" class="btn">Search</button>
78</form>
89<span class="spacer"></span>
910</div>
internal/web/templates/globalsearch.html +1 −1
@@ -13,7 +13,7 @@
1313<form method="get" action="/search" class="searchform">
1414 <input type="search" name="q" aria-label="Search" value="{{.Query}}" placeholder="repository names and topics, issue and merge request text" autofocus>
1515 {{if .Kind}}<input type="hidden" name="kind" value="{{.Kind}}">{{end}}
16 <button type="submit">search</button>
16 <button type="submit" class="btn">Search</button>
1717</form>
1818{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p>
1919{{else if .Query}}
internal/web/templates/issue.html +5 −5
@@ -15,7 +15,7 @@
1515<p><input type="text" name="title" aria-label="Title" value="{{.Issue.Title}}" required></p>
1616<p><textarea name="body" aria-label="Description" rows="8">{{.Issue.Body}}</textarea></p>
1717<p><input type="text" name="labels" aria-label="Labels" value="{{range $i, $l := .Issue.Labels}}{{if $i}} {{end}}{{$l}}{{end}}" placeholder="labels, space-separated (write access)"></p>
18<p><button type="submit">save</button></p>
18<p><button type="submit" class="btn">save</button></p>
1919</form></details>{{end}}
2020{{if .BodyHTML}}<article class="comment">
2121 <header class="commenthead"><strong><a href="/{{.Issue.Author}}">{{.Issue.Author}}</a></strong> <span class="when">{{when .Issue.CreatedAt}}</span></header>
@@ -31,7 +31,7 @@
3131{{if .Viewer}}
3232<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform">
3333<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p>
34<p><button type="submit">comment</button></p>
34<p><button type="submit" class="btn">comment</button></p>
3535</form>
3636{{end}}
3737</div>
@@ -55,7 +55,7 @@
5555 <form method="post" action="{{$base}}/label" class="actions">
5656 <input type="text" name="add" aria-label="Add labels" placeholder="add, space-separated">
5757 <input type="text" name="remove" aria-label="Remove labels" placeholder="remove">
58 <button type="submit">Apply</button>
58 <button type="submit" class="btn">Apply</button>
5959 </form>
6060 {{end}}
6161 </div>
@@ -67,7 +67,7 @@
6767 <form method="post" action="{{$base}}/assign" class="actions">
6868 <input type="text" name="add" aria-label="Add assignees" placeholder="add, space-separated">
6969 <input type="text" name="remove" aria-label="Remove assignees" placeholder="remove">
70 <button type="submit">Apply</button>
70 <button type="submit" class="btn">Apply</button>
7171 </form>
7272 {{end}}
7373 </div>
@@ -82,7 +82,7 @@
8282 <option value="none">No milestone</option>
8383 {{range .Milestones}}<option value="{{.Title}}"{{if eq .Title $.Issue.Milestone}} selected{{end}}>{{.Title}}</option>{{end}}
8484 </select>
85 <button type="submit">Apply</button>
85 <button type="submit" class="btn">Apply</button>
8686 </form>
8787 {{end}}
8888 </div>
internal/web/templates/issues.html +1
@@ -10,6 +10,7 @@
1010 {{range .Filters}}<p class="meta">{{.Key}}: {{if eq .Key "label"}}<span class="chip label" style="{{index $.LabelColors .Value}}">{{.Value}}</span>{{else}}<b>{{.Value}}</b>{{end}} <a href="{{.Clear}}">clear</a></p>{{end}}
1111 <form method="get" class="searchform compact">
1212 <input type="search" name="q" aria-label="Search issues" value="{{.Query}}" placeholder="search title and body">
13 <button type="submit" class="btn">Search</button>
1314 <input type="hidden" name="state" value="{{.State}}">
1415 </form>
1516 <span class="spacer"></span>
internal/web/templates/labels.html +2 −2
@@ -16,7 +16,7 @@
1616 <input type="hidden" name="action" value="remove">
1717 <input type="hidden" name="name" value="{{.Name}}">
1818 {{template "confirmfield" .Name}}
19 <button type="submit" class="linklike">Remove</button>
19 <button type="submit" class="danger">Remove</button>
2020 </form>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td>
2121</tr>
2222{{end}}</table></div>
@@ -29,7 +29,7 @@
2929 <input type="text" id="labelname" name="name" maxlength="50" required>
3030 <label for="labelcolor">Colour</label>
3131 <input type="text" id="labelcolor" name="color" placeholder="rrggbb, or blank for one picked from the name">
32 <button type="submit">Create label</button>
32 <button type="submit" class="btn">Create label</button>
3333 </form>
3434</details>
3535<p class="meta">Removing a label takes it off every issue that carries it.</p>
internal/web/templates/layout.html +3 −3
@@ -162,8 +162,8 @@
162162 <input type="hidden" name="line" value="{{if eq .Class "del"}}{{.OldLine}}{{else}}{{.NewLine}}{{end}}">
163163 <input type="hidden" name="side" value="{{if eq .Class "del"}}old{{else}}new{{end}}">
164164 <p><textarea name="body" aria-label="Comment on {{.Path}}" rows="3" placeholder="Comment on this line" autofocus></textarea></p>
165 <p><button type="submit">Comment</button>
166 <button type="submit" name="pending" value="on">Add to review</button>
165 <p><button type="submit" class="btn">Comment</button>
166 <button type="submit" name="pending" value="on" class="btn">Add to review</button>
167167 <a href="{{$base}}?view=diff">Cancel</a></p>
168168 </form></td></tr>
169169 {{end}}{{end}}{{range .Threads}}<tr class="threadrow"><td colspan="3">{{template "thread" dict "T" . "Base" $base "Viewer" $viewer "Class" ""}}</td></tr>
@@ -186,7 +186,7 @@
186186<form method="post" action="{{.Base}}/diff-comment">
187187 <input type="hidden" name="reply" value="{{$t.ID}}">
188188 <p><textarea name="body" aria-label="Reply to thread {{$t.ID}}" rows="2" placeholder="Reply as {{.Viewer}}"></textarea></p>
189 <p><button type="submit">Reply</button></p>
189 <p><button type="submit" class="btn">Reply</button></p>
190190</form></details>{{end}}
191191{{if $t.CanResolve}}<form method="post" action="{{.Base}}/thread" class="threadact"><input type="hidden" name="thread" value="{{$t.ID}}"><button type="submit" name="action" value="{{if $t.Resolved}}unresolve{{else}}resolve{{end}}" class="linklike">{{if $t.Resolved}}Reopen thread{{else}}Resolve thread{{end}}</button></form>{{end}}
192192</div>{{end}}
internal/web/templates/log.html +1 −1
@@ -4,7 +4,7 @@
44<form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">
55 <label for="path">Path</label>
66 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory">
7 <button type="submit">Filter</button>
7 <button type="submit" class="btn">Search</button>
88 {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}}
99</form>
1010{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}}
internal/web/templates/login.html +1 −1
@@ -1,6 +1,6 @@
11{{define "title"}}login · {{.Site}}{{end}}
22{{define "content"}}
3<h1>Log in</h1>
3<h1>Sign in</h1>
44{{if .Next}}<p class="meta">Log in to continue to <code>{{.Next}}</code>.</p>{{end}}
55{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
66{{if .Sent}}
internal/web/templates/mr.html +9 −9
@@ -34,7 +34,7 @@
3434<form method="post" action="{{$base}}/edit" class="commentform">
3535<p><input type="text" name="title" aria-label="Title" value="{{.MR.Title}}" required></p>
3636<p><textarea name="body" aria-label="Description" rows="8">{{.MR.Body}}</textarea></p>
37<p><button type="submit">Save</button></p>
37<p><button type="submit" class="btn">Save</button></p>
3838</form></details>{{end}}
3939{{if .BodyHTML}}<article class="comment">
4040 <header class="commenthead"><strong><a href="/{{.MR.Author}}">{{.MR.Author}}</a></strong></header>
@@ -52,7 +52,7 @@
5252{{if .Viewer}}
5353<form method="post" action="{{$base}}/comment" class="commentform">
5454<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p>
55<p><button type="submit">Comment</button></p>
55<p><button type="submit" class="btn">Comment</button></p>
5656</form>
5757{{end}}
5858
@@ -86,8 +86,8 @@
8686 <div class="grp">
8787 <h2>Review</h2>
8888 <form method="post" action="{{$base}}/review" class="actions">
89 <button type="submit" name="verdict" value="approve">Approve</button>
90 <button type="submit" name="verdict" value="request-changes">Request changes</button>
89 <button type="submit" name="verdict" value="approve" class="btn">Approve</button>
90 <button type="submit" name="verdict" value="request-changes" class="btn">Request changes</button>
9191 </form>
9292 </div>
9393 <div class="grp">
@@ -105,11 +105,11 @@
105105 <button type="submit">Merge</button>
106106 </form>
107107 <form method="post" action="{{$base}}/close" class="actions">
108 <button type="submit">Close without merging</button>
108 <button type="submit" class="danger">Close without merging</button>
109109 </form>
110110 <form method="post" action="{{$base}}/draft" class="actions">
111 {{if .MR.Draft}}<button type="submit">Ready for review</button>
112 {{else}}<input type="hidden" name="draft" value="on"><button type="submit">Convert to draft</button>{{end}}
111 {{if .MR.Draft}}<button type="submit" class="btn">Ready for review</button>
112 {{else}}<input type="hidden" name="draft" value="on"><button type="submit" class="btn">Convert to draft</button>{{end}}
113113 </form>
114114 </div>
115115 {{end}}
@@ -121,7 +121,7 @@
121121 <select id="target" name="target">
122122 {{range .Branches}}<option value="{{.Name}}"{{if eq .Name $.MR.TargetRef}} selected{{end}}>{{.Name}}</option>{{end}}
123123 </select>
124 <button type="submit">Retarget</button>
124 <button type="submit" class="btn">Retarget</button>
125125 </form>
126126 <p class="row none">Retargeting stales existing reviews.</p>
127127 </div>
@@ -134,7 +134,7 @@
134134 <form method="post" action="{{$base}}/review-request" class="actions">
135135 <input type="text" name="add" aria-label="Add reviewers" placeholder="add, space-separated">
136136 <input type="text" name="remove" aria-label="Remove reviewers" placeholder="remove">
137 <button type="submit">Apply</button>
137 <button type="submit" class="btn">Apply</button>
138138 </form>
139139 {{end}}
140140 </div>
internal/web/templates/mrs.html +1
@@ -10,6 +10,7 @@
1010 </nav>
1111 <form method="get" class="searchform compact">
1212 <input type="search" name="q" aria-label="Search merge requests" value="{{.Query}}" placeholder="search title and body">
13 <button type="submit" class="btn">Search</button>
1314 <input type="hidden" name="state" value="{{.State}}">
1415 </form>
1516 {{range .Filters}}<p class="meta">{{.Key}}: <b>{{.Value}}</b> <a href="{{.Clear}}">clear</a></p>{{end}}
internal/web/templates/owner.html +12 −12
@@ -34,7 +34,7 @@
3434 <input type="hidden" name="field" value="org-create">
3535 <label for="orgname">Name</label>
3636 <input type="text" id="orgname" name="name" required>
37 <button type="submit">Create</button>
37 <button type="submit" class="btn">Create</button>
3838 </form>
3939</details>
4040{{end}}
@@ -52,7 +52,7 @@
5252{{end}}</table></div>
5353<details class="editbox">
5454 <summary>Add or change a member</summary>
55 <form method="post" action="/{{$org}}" class="setform">
55 <form method="post" action="/{{$org}}" class="setform stack">
5656 <input type="hidden" name="field" value="member-add">
5757 <label for="member">Username</label>
5858 <input type="text" id="member" name="user" required>
@@ -61,7 +61,7 @@
6161 <option value="member">member</option>
6262 <option value="admin">admin</option>
6363 </select>
64 <button type="submit">Apply</button>
64 <button type="submit" class="btn">Apply</button>
6565 </form>
6666</details>
6767
@@ -75,14 +75,14 @@ of a team get its role on every repository it is granted.</p>
7575 <div class="teambody">
7676 <p class="meta">members: {{range .Members}}<a class="memberchip" href="/{{.}}">{{.}}</a> {{else}}<span class="none">none yet</span>{{end}}</p>
7777 <p class="meta">repositories: {{range .Grants}}<span class="memberchip"><a href="/{{.RepoPath}}">{{.RepoPath}}</a> <span class="role">{{.Role}}</span></span> {{else}}<span class="none">none yet</span>{{end}}</p>
78 <form method="post" action="/{{$org}}" class="setform">
78 <form method="post" action="/{{$org}}" class="setform stack">
7979 <input type="hidden" name="team" value="{{.Name}}">
8080 <label class="none" for="tm-{{.Name}}">Members</label>
8181 <input type="text" id="tm-{{.Name}}" name="user" placeholder="usernames, space-separated">
82 <button type="submit" name="field" value="team-add">Add</button>
83 <button type="submit" name="field" value="team-remove">Remove</button>
82 <button type="submit" name="field" value="team-add" class="btn">Add</button>
83 <button type="submit" name="field" value="team-remove" class="btn">Remove</button>
8484 </form>
85 <form method="post" action="/{{$org}}" class="setform">
85 <form method="post" action="/{{$org}}" class="setform stack">
8686 <input type="hidden" name="team" value="{{.Name}}">
8787 <label class="none" for="tr-{{.Name}}">Repository</label>
8888 <input type="text" id="tr-{{.Name}}" name="repo" placeholder="owner/name">
@@ -92,14 +92,14 @@ of a team get its role on every repository it is granted.</p>
9292 <option value="write">write</option>
9393 <option value="admin">admin</option>
9494 </select>
95 <button type="submit" name="field" value="team-grant">Grant</button>
96 <button type="submit" name="field" value="team-revoke">Revoke</button>
95 <button type="submit" name="field" value="team-grant" class="btn">Grant</button>
96 <button type="submit" name="field" value="team-revoke" class="btn">Revoke</button>
9797 </form>
9898 <form method="post" action="/{{$org}}" class="setform">
9999 <input type="hidden" name="field" value="team-delete">
100100 <input type="hidden" name="team" value="{{.Name}}">
101101 {{template "confirmfield" .Name}}
102 <button type="submit" class="linklike">Delete this team</button>
102 <button type="submit" class="danger">Delete this team</button>
103103 </form>
104104 </div>
105105</details>
@@ -110,7 +110,7 @@ of a team get its role on every repository it is granted.</p>
110110 <input type="hidden" name="field" value="team-create">
111111 <label for="newteam">Name</label>
112112 <input type="text" id="newteam" name="team" required>
113 <button type="submit">Create</button>
113 <button type="submit" class="btn">Create</button>
114114 </form>
115115</details>
116116
@@ -121,7 +121,7 @@ of a team get its role on every repository it is granted.</p>
121121 <input type="hidden" name="field" value="org-rename">
122122 <label for="orgrename">New name</label>
123123 <input type="text" id="orgrename" name="name" value="{{$org}}" required>
124 <button type="submit">Rename</button>
124 <button type="submit" class="btn">Rename</button>
125125 </form>
126126 <p class="meta">Every clone URL under this organization changes with the name.</p>
127127</details>
internal/web/templates/register.html +2 −2
@@ -6,9 +6,9 @@
66{{else}}<p class="lede">Open registration — your account activates once you verify your email.</p>{{end}}
77{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
88<form method="post" action="/register" class="signupform">
9<p><label>username<br><input type="text" name="username" value="{{.Username}}" required autofocus></label></p>
9<p><label>Username<br><input type="text" name="username" value="{{.Username}}" required autofocus></label></p>
1010{{if eq .Mode "invite"}}<p><label>invite code<br><input type="text" name="invite" required></label></p>
11{{else}}<p><label>email<br><input type="text" name="email" required></label></p>{{end}}
11{{else}}<p><label>Email<br><input type="text" name="email" required></label></p>{{end}}
1212<p><label>SSH public key — your key is your identity; paste e.g. <code>~/.ssh/id_ed25519.pub</code><br>
1313<textarea name="key" aria-label="SSH public key" rows="3" required placeholder="ssh-ed25519 AAAA... you@host"></textarea></label></p>
1414<p><button type="submit">Create account</button></p>
internal/web/templates/releases.html +3 −3
@@ -13,7 +13,7 @@
1313 </p>
1414 <p><input type="text" name="title" aria-label="Title" placeholder="title (defaults to the tag)"></p>
1515 <p><textarea name="notes" aria-label="Notes" rows="6" placeholder="what changed"></textarea></p>
16 <p><button type="submit">Create release</button></p>
16 <p><button type="submit" class="btn">Create release</button></p>
1717</form>
1818</details>
1919{{else if .CanWrite}}<p class="meta">Push a tag to create a release from it.</p>{{end}}
@@ -30,13 +30,13 @@
3030 <input type="hidden" name="tag" value="{{$rel.Tag}}">
3131 <p><input type="text" name="title" aria-label="Title" value="{{$rel.Title}}"></p>
3232 <p><textarea name="notes" aria-label="Notes" rows="6">{{$rel.Notes}}</textarea></p>
33 <p><button type="submit">Save</button></p>
33 <p><button type="submit" class="btn">Save</button></p>
3434 </form>
3535 {{if $.CanAdmin}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/releases" class="commentform">
3636 <input type="hidden" name="action" value="delete">
3737 <input type="hidden" name="tag" value="{{$rel.Tag}}">
3838 <p class="meta">Deleting is permanent and takes the assets with it. The tag stays.</p>
39 <p>{{template "confirmfield" $rel.Tag}} <button type="submit" class="linklike">Delete release</button></p>
39 <p>{{template "confirmfield" $rel.Tag}} <button type="submit" class="danger">Delete release</button></p>
4040 </form>{{end}}</details>{{end}}
4141 {{if $rel.Assets}}<table class="assets">
4242 <thead><tr><th scope="col">File</th><th scope="col">Bytes</th><th scope="col">SHA-256</th></tr></thead>
internal/web/templates/search.html +1 −1
@@ -3,7 +3,7 @@
33<h1>Search</h1>
44<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform">
55 <input type="search" name="q" aria-label="Search file contents" value="{{.Query}}" placeholder="search file contents on {{.Ref}}" autofocus>
6 <button type="submit">search</button>
6 <button type="submit" class="btn">Search</button>
77</form>
88{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p>
99{{else if .Query}}
internal/web/templates/settings.html +18 −18
@@ -9,13 +9,13 @@
99 <input type="hidden" name="field" value="description">
1010 <label for="description">Description</label>
1111 <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings">
12 <button type="submit">Save description</button>
12 <button type="submit" class="btn">Save description</button>
1313</form>
1414<form method="post" action="{{$base}}" class="setform">
1515 <input type="hidden" name="field" value="website">
1616 <label for="website">Website</label>
1717 <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org">
18 <button type="submit">Save website</button>
18 <button type="submit" class="btn">Save website</button>
1919</form>
2020{{if .Branches}}<form method="post" action="{{$base}}" class="setform">
2121 <input type="hidden" name="field" value="default-branch">
@@ -23,15 +23,15 @@
2323 <select id="default-branch" name="default-branch">
2424 {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}}
2525 </select>
26 <button type="submit">Save default branch</button>
26 <button type="submit" class="btn">Save default branch</button>
2727</form>
28{{end}}<form method="post" action="{{$base}}" class="setform">
28{{end}}<form method="post" action="{{$base}}" class="setform stack">
2929 <input type="hidden" name="field" value="topics">
3030 <label for="topics-add">Topics to add</label>
3131 <input type="text" id="topics-add" name="add" placeholder="add, space-separated">
3232 <label for="topics-remove">Topics to remove</label>
3333 <input type="text" id="topics-remove" name="remove" placeholder="remove">
34 <button type="submit">Apply</button>
34 <button type="submit" class="btn">Apply</button>
3535</form>
3636{{if .Topics}}<p class="meta">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}}
3737
@@ -43,13 +43,13 @@
4343 <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option>
4444 <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option>
4545 </select>
46 <button type="submit">Save visibility</button>
46 <button type="submit" class="btn">Save visibility</button>
4747</form>
4848<form method="post" action="{{$base}}" class="setform">
4949 <input type="hidden" name="field" value="git-daemon">
5050 <label for="git-daemon">Serve over git://</label>
5151 <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}>
52 <button type="submit">Save git://</button>
52 <button type="submit" class="btn">Save git://</button>
5353</form>
5454
5555<h2>Merge gates</h2>
@@ -58,31 +58,31 @@
5858 <input type="hidden" name="field" value="require-checks">
5959 <label for="require-checks">Require green checks</label>
6060 <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}>
61 <button type="submit">Save checks</button>
61 <button type="submit" class="btn">Save checks</button>
6262</form>
6363<form method="post" action="{{$base}}" class="setform">
6464 <input type="hidden" name="field" value="require-approvals">
6565 <label for="approvals">Required approvals</label>
6666 <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}">
67 <button type="submit">Save approvals</button>
67 <button type="submit" class="btn">Save approvals</button>
6868</form>
6969<form method="post" action="{{$base}}" class="setform">
7070 <input type="hidden" name="field" value="require-resolved">
7171 <label for="require-resolved">Require resolved threads</label>
7272 <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}>
73 <button type="submit">Save threads</button>
73 <button type="submit" class="btn">Save threads</button>
7474</form>
7575<form method="post" action="{{$base}}" class="setform">
7676 <input type="hidden" name="field" value="require-codeowners">
7777 <label for="require-codeowners">Require CODEOWNERS approval</label>
7878 <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}>
79 <button type="submit">Save CODEOWNERS</button>
79 <button type="submit" class="btn">Save CODEOWNERS</button>
8080</form>
8181<form method="post" action="{{$base}}" class="setform">
8282 <input type="hidden" name="field" value="require-signed">
8383 <label for="require-signed">Require signed commits</label>
8484 <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}>
85 <button type="submit">Save signing</button>
85 <button type="submit" class="btn">Save signing</button>
8686</form>
8787
8888<h2>Protected branches</h2>
@@ -103,13 +103,13 @@
103103 <select id="branch" name="branch">
104104 {{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}}
105105 </select>
106 <button type="submit">Protect</button>
106 <button type="submit" class="btn">Protect</button>
107107</form>
108108<form method="post" action="{{$base}}" class="setform">
109109 <input type="hidden" name="field" value="require-mr">
110110 <label for="require-mr">Merge requests only</label>
111111 <input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}>
112 <button type="submit">Save merge-only</button>
112 <button type="submit" class="btn">Save merge-only</button>
113113</form>
114114<p class="meta">With merge requests only, a protected branch refuses every direct push once it exists; the merge gates above are then what a change has to pass.</p>
115115
@@ -129,7 +129,7 @@
129129 <input type="hidden" name="field" value="protect-tag">
130130 <label for="glob">Protect tags matching</label>
131131 <input type="text" id="glob" name="glob" placeholder="v*">
132 <button type="submit">Protect</button>
132 <button type="submit" class="btn">Protect</button>
133133</form>
134134
135135<h2>Dependencies</h2>
@@ -137,7 +137,7 @@
137137 <input type="hidden" name="field" value="deps">
138138 <label for="deps">Check for updates</label>
139139 <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}>
140 <button type="submit">Save dependency checks</button>
140 <button type="submit" class="btn">Save dependency checks</button>
141141</form>
142142<p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against
143143proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind
@@ -173,7 +173,7 @@ depends on.</p>
173173 <input type="hidden" name="field" value="runner-add">
174174 <label for="runner-key">Attach a runner</label>
175175 <textarea id="runner-key" name="key" rows="3" placeholder="ssh-ed25519 AAAA… (from gitbay-runner init)"></textarea>
176 <button type="submit">Attach</button>
176 <button type="submit" class="btn">Attach</button>
177177</form>
178178<p class="meta">Install <code>gitbay-runner</code>, run <code>gitbay-runner init</code>, and paste the key it prints. The runner builds your commits with the repository's secrets; merge requests from forks wait unless it runs with <code>-untrusted</code>.</p>
179179
@@ -182,7 +182,7 @@ depends on.</p>
182182 <input type="hidden" name="field" value="archive">
183183 <label for="archive">Archived (read-only)</label>
184184 <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}>
185 <button type="submit">Save archive</button>
185 <button type="submit" class="btn">Save archive</button>
186186</form>
187187<p class="meta">Deleting or transferring a repository is a CLI operation:
188188<code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p>
internal/web/templates/snippet.html +5 −5
@@ -17,11 +17,11 @@
1717<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform">
1818<input type="hidden" name="name" value="{{.Name}}">
1919<p><textarea name="content" aria-label="Content of {{.Name}}" rows="12">{{.Content}}</textarea></p>
20<p><button type="submit">Save</button></p>
20<p><button type="submit" class="btn">Save</button></p>
2121</form>
2222<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove">
2323<input type="hidden" name="name" value="{{.Name}}">
24<p>{{template "confirmfield" .Name}} <button type="submit">Remove {{.Name}}</button></p>
24<p>{{template "confirmfield" .Name}} <button type="submit" class="danger">Remove {{.Name}}</button></p>
2525</form>
2626</details>{{end}}
2727</section>
@@ -31,7 +31,7 @@
3131<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform">
3232<p><input type="text" name="name" aria-label="File name" placeholder="filename" required></p>
3333<p><textarea name="content" aria-label="Content" rows="12" required></textarea></p>
34<p><button type="submit">Add file</button></p>
34<p><button type="submit" class="btn">Add file</button></p>
3535</form></details>
3636<details class="editbox"><summary>settings</summary>
3737<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit">
@@ -41,10 +41,10 @@
4141<option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option>
4242<option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option>
4343</select></p>
44<p><button type="submit">Save</button></p>
44<p><button type="submit" class="btn">Save</button></p>
4545</form>
4646<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/delete">
47<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit">Delete snippet</button></p>
47<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit" class="danger">Delete snippet</button></p>
4848</form>
4949</details>
5050{{end}}