Commit 7625f6da48

7625f6da48f1a273ffaddc04058ed0aad55d68bc

parent: d5cd988ef5

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

cmc <hello@cleberg.net> · 2026-11-25 10:20 UTC

web: polish code/commit/refs, explore/search, and labels/milestones

Layout: unified · split

Changed files (12)
internal/web/static/app.js +19 −3
@@ -76,7 +76,19 @@
7676 }
7777 }
7878
79 // ---- 3. In-place fragment swaps (previews, reactions, header toggles, sidebar pickers) ----
79 document.addEventListener('click', async (e) => {
80 const btn = e.target.closest('button[data-copy]');
81 if (!btn) return;
82 const orig = btn.textContent;
83 try {
84 await navigator.clipboard.writeText(btn.dataset.copy);
85 btn.textContent = 'Copied';
86 showToast('Copied to clipboard');
87 setTimeout(() => { btn.textContent = orig; }, 1400);
88 } catch {
89 showToast('Copy failed', true);
90 }
91 });
8092 document.addEventListener('submit', async (e) => {
8193 const form = e.target;
8294 if (!(form instanceof HTMLFormElement) || form.method.toLowerCase() !== 'post') return;
@@ -269,8 +281,12 @@
269281 let active = 0;
270282
271283 const render = () => {
272 const q = input.value.trim().toLowerCase();
273 const filtered = q ? all.filter((it) => (it.label + ' ' + it.group).toLowerCase().includes(q)) : all;
284 const raw = input.value.trim();
285 const q = raw.toLowerCase();
286 const filtered = q ? all.filter((it) => (it.label + ' ' + it.group).toLowerCase().includes(q)) : all.slice();
287 if (raw) {
288 filtered.push({ group: 'Search', label: `Search “${raw}”…`, href: '/search?q=' + encodeURIComponent(raw) });
289 }
274290 active = Math.min(active, Math.max(0, filtered.length - 1));
275291 list.textContent = '';
276292 if (filtered.length === 0) {
internal/web/static/style.css +7
@@ -2467,3 +2467,10 @@ article.release.setcard {
24672467}
24682468.commitbar input { flex: 1 1 16rem; min-width: 0; }
24692469.rendered .copywrap .copybtn { top: var(--sp-2); transform: none; }
2470.btngroup a.btn[aria-current="page"] {
2471 border-color: var(--mark);
2472 background: var(--surface);
2473 color: var(--fg);
2474 font-weight: 600;
2475}
2476.commithead.setcard pre.message { margin: var(--sp-3) 0 0; }
internal/web/templates/blob.html +7 −1
@@ -9,7 +9,13 @@
99 {{template "refmenu" .}}
1010 <span class="crumbs"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>/{{range .Crumbs}}<a href="{{.URL}}">{{.Name}}</a>/{{end}}<strong>{{.Base}}</strong></span>
1111 <span class="spacer"></span>
12 <span class="actions">{{if .Renderable}}{{if .Rendered}}<strong>rendered</strong> · <a href="?view=source">source</a>{{else}}<a href="?">rendered</a> · <strong>source</strong>{{end}} · {{end}}<a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}?path={{.Path}}">history</a> · {{if not .Binary}}<a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blame/{{.Ref}}/{{.Path}}">blame</a> · {{end}}<a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/raw/{{.Ref}}/{{.Path}}">raw</a>{{if .Viewer}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/edit/{{.Ref}}/{{.Path}}">edit</a>{{end}}</span>
12 <div class="btngroup">
13 {{if .Renderable}}{{if .Rendered}}<a class="button btn" aria-current="page" href="?">Rendered</a><a class="button btn" href="?view=source">Source</a>{{else}}<a class="button btn" href="?">Rendered</a><a class="button btn" aria-current="page" href="?view=source">Source</a>{{end}}{{end}}
14 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}?path={{.Path}}">History</a>
15 {{if not .Binary}}<a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blame/{{.Ref}}/{{.Path}}">Blame</a>{{end}}
16 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/raw/{{.Ref}}/{{.Path}}">Raw</a>
17 {{if .Viewer}}<a class="button" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/edit/{{.Ref}}/{{.Path}}">Edit</a>{{end}}
18 </div>
1319</div>
1420<p class="filefacts">{{if .Lines}}{{.Lines}} lines · {{end}}{{.Size}} bytes{{if .Exec}} · executable{{end}}{{if .Symlink}} · symlink{{end}}</p>
1521{{if .Symbols}}<details class="symlist"><summary>{{len .Symbols}} symbol{{if ne (len .Symbols) 1}}s{{end}} in this file</summary>
internal/web/templates/commit.html +7 −3
@@ -1,15 +1,19 @@
11{{define "width"}}wide{{end}}
22{{define "title"}}{{.ShortSHA}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
33{{define "content"}}
4<div class="commithead">
5 <h1>Commit <code>{{.ShortSHA}}</code></h1>
4<div class="commithead setcard">
5 <div class="pagehead">
6 <h1>Commit <code>{{.ShortSHA}}</code></h1>
7 <span class="grow"></span>
8 <button type="button" class="btn" data-copy="{{.SHA}}">Copy SHA</button>
9 </div>
610 <p class="meta"><code class="fullsha">{{.SHA}}</code></p>
711 {{if .Parents}}<p class="meta">parent{{if gt (len .Parents) 1}}s{{end}}:{{range .Parents}} <code><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.}}">{{short .}}</a></code>{{end}}</p>{{end}}
812 <p>{{template "sigbadge" .Sig}}{{range .Checks}} <span class="badge check-{{.State}}">{{.Context}}: {{.State}}</span>{{end}}</p>
913 <p class="meta">{{template "authorname" dict "Name" .AuthorName "User" .AuthorUser "Email" .AuthorEmail}} &lt;{{.AuthorEmail}}&gt; · {{when .Date}}
1014 {{if .CommitterEmail}}<br>committer: &lt;{{.CommitterEmail}}&gt;{{end}}</p>
15 <pre class="message" tabindex="0">{{.Message}}</pre>
1116</div>
12<pre class="message" tabindex="0">{{.Message}}</pre>
1317{{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}}
1418{{template "difffiles" dict "Files" .DiffFiles "Base" "" "Viewer" "" "L" .Layout}}
1519{{end}}
internal/web/templates/compare.html +6 −2
@@ -1,8 +1,12 @@
11{{define "width"}}wide{{end}}
22{{define "title"}}compare {{.Base}}...{{.Head}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
33{{define "content"}}
4<h1>Compare <code>{{.Base}}</code> … <code>{{.Head}}</code></h1>
5<p class="meta">{{len .Commits}}{{if gt .CommitsTotal (len .Commits)}} of {{.CommitsTotal}}{{end}} commit{{if ne .CommitsTotal 1}}s{{end}} on <code>{{.Head}}</code> since the merge base <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/commit/{{.MergeBase}}"><code>{{short .MergeBase}}</code></a>{{if .CanOpenMR}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/new?source={{.Head}}&amp;target={{.Base}}">open a merge request</a>{{end}}</p>
4<div class="pagehead">
5 <h1>Compare <code>{{.Base}}</code> … <code>{{.Head}}</code></h1>
6 <span class="grow"></span>
7 {{if .CanOpenMR}}<a class="button" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/new?source={{.Head}}&amp;target={{.Base}}">Open merge request</a>{{end}}
8</div>
9<p class="meta">{{len .Commits}}{{if gt .CommitsTotal (len .Commits)}} of {{.CommitsTotal}}{{end}} commit{{if ne .CommitsTotal 1}}s{{end}} on <code>{{.Head}}</code> since the merge base <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/commit/{{.MergeBase}}"><code>{{short .MergeBase}}</code></a></p>
610{{if .Commits}}<ul class="loglist">
711{{range .Commits}}<li>
812 <div class="commitmain">
internal/web/templates/explore.html +2 −1
@@ -1,7 +1,7 @@
11{{define "width"}}wide{{end}}
22{{define "title"}}explore · {{.Site}}{{end}}
33{{define "content"}}
4<div class="withcol">
4<div class="withcol" id="explore-root">
55{{template "sidecol" .Facets}}
66<div class="colmain">
77<div class="headrow">
@@ -11,6 +11,7 @@
1111 <button type="submit" class="btn">Search</button>
1212</form>
1313<span class="spacer"></span>
14{{if .Viewer}}<a class="button" href="/new">New repository</a>{{end}}
1415</div>
1516<p class="meta">{{.Total}} repositor{{if eq .Total 1}}y{{else}}ies{{end}}{{if .Query}} matching <strong>{{.Query}}</strong>, <a href="/explore">clear filter</a>{{end}}</p>
1617<ul class="repolist rows">
internal/web/templates/globalsearch.html +2 −2
@@ -1,8 +1,8 @@
11{{define "width"}}wide{{end}}
22{{define "title"}}search · {{.Site}}{{end}}
33{{define "content"}}
4<div class="withcol">
5<nav class="sidecol" aria-label="Filters">
4<div class="withcol" id="search-root">
5<nav class="sidecol" aria-label="Filters" data-tab-swap="search-root">
66<details class="sidedrop">
77<summary><span class="sideword">Filters</span>{{if .Kind}} <span class="sideon">{{.Kind}}</span>{{end}}</summary>
88 <div class="grp"><h2 class="colhead">Kind</h2>
internal/web/templates/labels.html +20 −12
@@ -1,10 +1,15 @@
11{{define "title"}}labels · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
22{{define "content"}}
3<h1>Labels</h1>
3<div class="pagehead">
4 <h1>Labels <span class="chip">{{len .Labels}}</span></h1>
5 <span class="grow"></span>
6 {{if .Labels}}<input type="search" class="tablefilter" placeholder="Filter labels…" aria-label="Filter labels" data-filter-table="labels-table">{{end}}
7</div>
48{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
5{{if .Labels}}<div class="tablewrap"><table class="keys">
6<tr class="cols"><th scope="col">label</th>{{if or $.CanWrite $.AnyColor}}<th scope="col">colour</th>{{end}}<th scope="col">issues</th><th scope="col">merge requests</th><th scope="col"><span class="vh">actions</span></th></tr>
7{{range .Labels}}<tr>
9<section class="setcard">
10{{if .Labels}}<div class="tablewrap"><table class="keys" id="labels-table">
11<thead><tr class="cols"><th scope="col">label</th>{{if or $.CanWrite $.AnyColor}}<th scope="col">colour</th>{{end}}<th scope="col">issues</th><th scope="col">merge requests</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
12<tbody>{{range .Labels}}<tr>
813 <td><a class="chip label" style="{{index $.LabelColors .Name}}" href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/issues?label={{.Name}}">{{.Name}}</a>{{if .Org}} <span class="chip chip-neutral">org</span>{{end}}</td>
914 {{if or $.CanWrite $.AnyColor}}<td>{{if and $.CanWrite (not .Org)}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/labels" class="inline">
1015 <input type="hidden" name="name" value="{{.Name}}">
@@ -13,14 +18,16 @@
1318 </form>{{else}}<span class="mono">{{if .Color}}{{.Color}}{{else}}—{{end}}</span>{{end}}</td>{{end}}
1419 <td>{{.Issues}}</td>
1520 <td>{{.MRs}}</td>
16 <td class="act">{{if and $.CanWrite (not .Org)}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/labels" class="inline">
17 <input type="hidden" name="action" value="remove">
18 <input type="hidden" name="name" value="{{.Name}}">
19 {{template "confirmfield" .Name}}
20 <button type="submit" class="danger">Remove</button>
21 </form>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td>
21 <td class="act">{{if and $.CanWrite (not .Org)}}<details class="popover"><summary class="popbtn popbtn-danger">Remove</summary><div class="popmenu">
22 <form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/labels" class="popform popform-stack">
23 <input type="hidden" name="action" value="remove">
24 <input type="hidden" name="name" value="{{.Name}}">
25 {{template "confirmfield" .Name}}
26 <button type="submit" class="danger">Remove</button>
27 </form>
28 </div></details>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td>
2229</tr>
23{{end}}</table></div>
30{{end}}</tbody></table></div>
2431{{else}}<p class="none">No labels yet.</p>{{end}}
2532{{if .CanWrite}}
2633<details class="editbox">
@@ -30,9 +37,10 @@
3037 <input type="text" id="labelname" name="name" maxlength="50" required>
3138 <label for="labelcolor">Colour</label>
3239 <input type="text" id="labelcolor" name="color" placeholder="rrggbb, or blank for one picked from the name">
33 <button type="submit" class="btn">Create label</button>
40 <span class="btngroup"><button type="submit">Create label</button></span>
3441 </form>
3542</details>
3643<p class="meta">Removing a label takes it off every issue and merge request that carries it.</p>
3744{{end}}
45</section>
3846{{end}}
internal/web/templates/milestones.html +11 −7
@@ -1,13 +1,14 @@
11{{define "title"}}milestones · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
22{{define "content"}}
3<div class="listhead">
3<div id="milestones-root">
4<div class="pagehead">
45 <h1>Milestones</h1>
5 <nav class="filters">
6 <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
9 </nav>
106</div>
7<nav class="statebar" aria-label="State" data-tab-swap="milestones-root">
8 <a {{if eq .State "open"}}aria-current="page" {{end}}href="?state=open">open</a>
9 <a {{if eq .State "closed"}}aria-current="page" {{end}}href="?state=closed">closed</a>
10 <a {{if eq .State "all"}}aria-current="page" {{end}}href="?state=all">all</a>
11</nav>
1112{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
1213{{if .CanWrite}}
1314<details class="editbox">
@@ -19,10 +20,11 @@
1920 <input type="text" id="msdesc" name="description">
2021 <label for="msdue">Due</label>
2122 <input type="text" id="msdue" name="due" placeholder="YYYY-MM-DD">
22 <button type="submit" class="btn">Create milestone</button>
23 <span class="btngroup"><button type="submit">Create milestone</button></span>
2324 </form>
2425</details>
2526{{end}}
27<section class="setcard">
2628<ul class="milestonelist">
2729{{range .Milestones}}<li>
2830 <div class="msmain">
@@ -38,4 +40,6 @@
3840</li>
3941{{else}}<li class="empty">no {{if ne .State "all"}}{{.State}} {{end}}milestones</li>{{end}}
4042</ul>
43</section>
44</div>
4145{{end}}
internal/web/templates/orglabels.html +20 −12
@@ -1,11 +1,16 @@
11{{define "title"}}labels · {{.Org}}{{end}}
22{{define "content"}}
3<h1><a href="/{{.Org}}">{{.Org}}</a> labels</h1>
3<div class="pagehead">
4 <h1><a href="/{{.Org}}">{{.Org}}</a> labels <span class="chip">{{len .Labels}}</span></h1>
5 <span class="grow"></span>
6 {{if .Labels}}<input type="search" class="tablefilter" placeholder="Filter labels…" aria-label="Filter labels" data-filter-table="org-labels-table">{{end}}
7</div>
48{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
59<p class="meta">Every repository under {{.Org}} sees these beside its own. Counts span the repositories you can read.</p>
6{{if .Labels}}<div class="tablewrap"><table class="keys">
7<tr class="cols"><th scope="col">label</th><th scope="col">colour</th><th scope="col">issues</th><th scope="col">merge requests</th>{{if .CanAdmin}}<th scope="col"><span class="vh">actions</span></th>{{end}}</tr>
8{{range .Labels}}<tr>
10<section class="setcard">
11{{if .Labels}}<div class="tablewrap"><table class="keys" id="org-labels-table">
12<thead><tr class="cols"><th scope="col">label</th><th scope="col">colour</th><th scope="col">issues</th><th scope="col">merge requests</th>{{if .CanAdmin}}<th scope="col"><span class="vh">actions</span></th>{{end}}</tr></thead>
13<tbody>{{range .Labels}}<tr>
914 <td><span class="chip label" style="{{index $.LabelColors .Name}}">{{.Name}}</span></td>
1015 <td>{{if $.CanAdmin}}<form method="post" action="/{{$.Org}}/-/labels" class="inline">
1116 <input type="hidden" name="name" value="{{.Name}}">
@@ -14,14 +19,16 @@
1419 </form>{{else}}<span class="mono">{{if .Color}}{{.Color}}{{else}}—{{end}}</span>{{end}}</td>
1520 <td>{{.Issues}}</td>
1621 <td>{{.MRs}}</td>
17 {{if $.CanAdmin}}<td class="act"><form method="post" action="/{{$.Org}}/-/labels" class="inline">
18 <input type="hidden" name="action" value="remove">
19 <input type="hidden" name="name" value="{{.Name}}">
20 {{template "confirmfield" .Name}}
21 <button type="submit" class="danger">Remove</button>
22 </form></td>{{end}}
22 {{if $.CanAdmin}}<td class="act"><details class="popover"><summary class="popbtn popbtn-danger">Remove</summary><div class="popmenu">
23 <form method="post" action="/{{$.Org}}/-/labels" class="popform popform-stack">
24 <input type="hidden" name="action" value="remove">
25 <input type="hidden" name="name" value="{{.Name}}">
26 {{template "confirmfield" .Name}}
27 <button type="submit" class="danger">Remove</button>
28 </form>
29 </div></details></td>{{end}}
2330</tr>
24{{end}}</table></div>
31{{end}}</tbody></table></div>
2532{{else}}<p class="none">No org labels yet.</p>{{end}}
2633{{if .CanAdmin}}
2734<details class="editbox">
@@ -31,9 +38,10 @@
3138 <input type="text" id="labelname" name="name" maxlength="50" required>
3239 <label for="labelcolor">Colour</label>
3340 <input type="text" id="labelcolor" name="color" placeholder="rrggbb, or blank for one picked from the name">
34 <button type="submit" class="btn">Create label</button>
41 <span class="btngroup"><button type="submit">Create label</button></span>
3542 </form>
3643</details>
3744<p class="meta">Removing a label takes it off every issue and merge request under {{.Org}}. Creating one folds in same-named repository labels.</p>
3845{{end}}
46</section>
3947{{end}}
internal/web/templates/orgmilestones.html +11 −7
@@ -1,13 +1,14 @@
11{{define "title"}}milestones · {{.Org}}{{end}}
22{{define "content"}}
3<div class="listhead">
3<div id="milestones-root">
4<div class="pagehead">
45 <h1><a href="/{{.Org}}">{{.Org}}</a> milestones</h1>
5 <nav class="filters">
6 <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
7 <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
8 <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
9 </nav>
106</div>
7<nav class="statebar" aria-label="State" data-tab-swap="milestones-root">
8 <a {{if eq .State "open"}}aria-current="page" {{end}}href="?state=open">open</a>
9 <a {{if eq .State "closed"}}aria-current="page" {{end}}href="?state=closed">closed</a>
10 <a {{if eq .State "all"}}aria-current="page" {{end}}href="?state=all">all</a>
11</nav>
1112{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
1213{{if .CanAdmin}}
1314<details class="editbox">
@@ -19,11 +20,12 @@
1920 <input type="text" id="msdesc" name="description">
2021 <label for="msdue">Due</label>
2122 <input type="text" id="msdue" name="due" placeholder="YYYY-MM-DD">
22 <button type="submit" class="btn">Create milestone</button>
23 <span class="btngroup"><button type="submit">Create milestone</button></span>
2324 </form>
2425</details>
2526{{end}}
2627<p class="meta">Progress spans the repositories under {{.Org}} you can read.</p>
28<section class="setcard">
2729<ul class="milestonelist">
2830{{range .Milestones}}<li>
2931 <div class="msmain">
@@ -39,4 +41,6 @@
3941</li>
4042{{else}}<li class="empty">no {{if ne .State "all"}}{{.State}} {{end}}org milestones</li>{{end}}
4143</ul>
44</section>
45</div>
4246{{end}}
internal/web/templates/refs.html +21 −5
@@ -1,13 +1,29 @@
11{{define "title"}}refs · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
22{{define "content"}}
3<h1>Refs</h1>
3<div class="pagehead">
4 <h1>Refs</h1>
5</div>
6<section class="setcard">
47<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/compare" class="compareform">
58 <label>Compare <input name="base" value="{{.Repo.DefaultBranch}}" size="14" aria-label="Compare base ref" autocomplete="off" spellcheck="false"></label>
69 <label>with <input name="head" size="14" placeholder="branch, tag or sha" aria-label="with head ref" autocomplete="off" spellcheck="false"></label>
710 <button type="submit" class="btn">Compare</button>
811</form>
9<h2>Branches</h2>
10<table class="refs"><thead><tr><th scope="col">Branch</th><th scope="col">Commit</th></tr></thead>{{range .Branches}}<tr><td class="name">{{template "branchicon"}} <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
11<h2>Tags</h2>
12<table class="refs"><thead><tr><th scope="col">Tag</th><th scope="col">Commit</th></tr></thead>{{range .Tags}}<tr><td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty">none</td></tr>{{end}}</table>
12</section>
13<section class="setcard">
14<div class="pagehead">
15 <h2>Branches <span class="chip">{{len .Branches}}</span></h2>
16 <span class="grow"></span>
17 {{if .Branches}}<input type="search" class="tablefilter" placeholder="Filter branches…" aria-label="Filter branches" data-filter-table="refs-branches">{{end}}
18</div>
19<div class="tablewrap"><table class="refs" id="refs-branches"><thead><tr><th scope="col">Branch</th><th scope="col">Commit</th></tr></thead><tbody>{{range .Branches}}<tr><td class="name">{{template "branchicon"}} <a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty" colspan="2">none</td></tr>{{end}}</tbody></table></div>
20</section>
21<section class="setcard">
22<div class="pagehead">
23 <h2>Tags <span class="chip">{{len .Tags}}</span></h2>
24 <span class="grow"></span>
25 {{if .Tags}}<input type="search" class="tablefilter" placeholder="Filter tags…" aria-label="Filter tags" data-filter-table="refs-tags">{{end}}
26</div>
27<div class="tablewrap"><table class="refs" id="refs-tags"><thead><tr><th scope="col">Tag</th><th scope="col">Commit</th></tr></thead><tbody>{{range .Tags}}<tr><td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}/">{{.Name}}</a></td><td class="sha"><code>{{short .SHA}}</code></td></tr>{{else}}<tr><td class="empty" colspan="2">none</td></tr>{{end}}</tbody></table></div>
28</section>
1329{{end}}