Commit 7625f6da48
Copy SHA
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 @@
76 76 }
77 77 }
78 78
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 } ) ;
80 92 document . addEventListener ( 'submit' , async ( e ) => {
81 93 const form = e . target ;
82 94 if ( ! ( form instanceof HTMLFormElement ) || form . method . toLowerCase ( ) !== 'post' ) return ;
@@ -269,8 +281,12 @@
269 281 let active = 0 ;
270 282
271 283 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 }
274 290 active = Math . min ( active , Math . max ( 0 , filtered . length - 1 ) ) ;
275 291 list . textContent = '' ;
276 292 if ( filtered . length === 0 ) {
internal/web/static/style.css
+7
@@ -2467,3 +2467,10 @@ article.release.setcard {
2467 2467 }
2468 2468 . commitbar input { flex : 1 1 16 rem ; min-width : 0 ; }
2469 2469 . 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 @@
9 9 {{template "refmenu" .}}
10 10 < span class = "crumbs" > < a href = "/{{.Repo.OwnerName}}/{{.Repo.Name}}" > {{.Repo.Name}}< / a > /{{range .Crumbs}}< a href = "{{.URL}}" > {{.Name}}< / a > /{{end}}< strong > {{.Base}}< / strong > < / span >
11 11 < 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 >
13 19 < / div >
14 20 < p class = "filefacts" > {{if .Lines}}{{.Lines}} lines · {{end}}{{.Size}} bytes{{if .Exec}} · executable{{end}}{{if .Symlink}} · symlink{{end}}< / p >
15 21 {{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 @@
1 1 {{define "width"}}wide{{end}}
2 2 {{define "title"}}{{.ShortSHA}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3 3 {{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 >
6 10 < p class = "meta" > < code class = "fullsha" > {{.SHA}}< / code > < / p >
7 11 {{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}}
8 12 < p > {{template "sigbadge" .Sig}}{{range .Checks}} < span class = "badge check-{{.State}}" > {{.Context}}: {{.State}}< / span > {{end}}< / p >
9 13 < p class = "meta" > {{template "authorname" dict "Name" .AuthorName "User" .AuthorUser "Email" .AuthorEmail}} < {{.AuthorEmail}}> · {{when .Date}}
10 14 {{if .CommitterEmail}}< br > committer: < {{.CommitterEmail}}> {{end}}< / p >
15 < pre class = "message" tabindex = "0" > {{.Message}}< / pre >
11 16 < / div >
12 < pre class = "message" tabindex = "0" > {{.Message}}< / pre >
13 17 {{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 18 {{template "difffiles" dict "Files" .DiffFiles "Base" "" "Viewer" "" "L" .Layout}}
15 19 {{end}}
internal/web/templates/compare.html
+6 −2
@@ -1,8 +1,12 @@
1 1 {{define "width"}}wide{{end}}
2 2 {{define "title"}}compare {{.Base}}...{{.Head}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3 3 {{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}}&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}}&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 >
6 10 {{if .Commits}}< ul class = "loglist" >
7 11 {{range .Commits}}< li >
8 12 < div class = "commitmain" >
internal/web/templates/explore.html
+2 −1
@@ -1,7 +1,7 @@
1 1 {{define "width"}}wide{{end}}
2 2 {{define "title"}}explore · {{.Site}}{{end}}
3 3 {{define "content"}}
4 < div class = "withcol" >
4 < div class = "withcol" id = "explore-root" >
5 5 {{template "sidecol" .Facets}}
6 6 < div class = "colmain" >
7 7 < div class = "headrow" >
@@ -11,6 +11,7 @@
11 11 < button type = "submit" class = "btn" > Search< / button >
12 12 < / form >
13 13 < span class = "spacer" > < / span >
14 {{if .Viewer}}< a class = "button" href = "/new" > New repository< / a > {{end}}
14 15 < / div >
15 16 < 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 >
16 17 < ul class = "repolist rows" >
internal/web/templates/globalsearch.html
+2 −2
@@ -1,8 +1,8 @@
1 1 {{define "width"}}wide{{end}}
2 2 {{define "title"}}search · {{.Site}}{{end}}
3 3 {{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" >
6 6 < details class = "sidedrop" >
7 7 < summary > < span class = "sideword" > Filters< / span > {{if .Kind}} < span class = "sideon" > {{.Kind}}< / span > {{end}}< / summary >
8 8 < div class = "grp" > < h2 class = "colhead" > Kind< / h2 >
internal/web/templates/labels.html
+20 −12
@@ -1,10 +1,15 @@
1 1 {{define "title"}}labels · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
2 2 {{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 >
4 8 {{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 >
8 13 < 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 >
9 14 {{if or $.CanWrite $.AnyColor}}< td > {{if and $.CanWrite (not .Org)}}< form method = "post" action = "/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/labels" class = "inline" >
10 15 < input type = "hidden" name = "name" value = "{{.Name}}" >
@@ -13,14 +18,16 @@
13 18 < / form > {{else}}< span class = "mono" > {{if .Color}}{{.Color}}{{else}}—{{end}}< / span > {{end}}< / td > {{end}}
14 19 < td > {{.Issues}}< / td >
15 20 < 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 >
22 29 < / tr >
23 {{end}}< / table > < / div >
30 {{end}}< / tbody > < / table > < / div >
24 31 {{else}}< p class = "none" > No labels yet.< / p > {{end}}
25 32 {{if .CanWrite}}
26 33 < details class = "editbox" >
@@ -30,9 +37,10 @@
30 37 < input type = "text" id = "labelname" name = "name" maxlength = "50" required >
31 38 < label for = "labelcolor" > Colour< / label >
32 39 < 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 >
34 41 < / form >
35 42 < / details >
36 43 < p class = "meta" > Removing a label takes it off every issue and merge request that carries it.< / p >
37 44 {{end}}
45 < / section >
38 46 {{end}}
internal/web/templates/milestones.html
+11 −7
@@ -1,13 +1,14 @@
1 1 {{define "title"}}milestones · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
2 2 {{define "content"}}
3 < div class = "listhead" >
3 < div id = "milestones-root" >
4 < div class = "pagehead" >
4 5 < 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 >
10 6 < / 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 >
11 12 {{if .Notice}}< p class = "error" role = "alert" > {{.Notice}}< / p > {{end}}
12 13 {{if .CanWrite}}
13 14 < details class = "editbox" >
@@ -19,10 +20,11 @@
19 20 < input type = "text" id = "msdesc" name = "description" >
20 21 < label for = "msdue" > Due< / label >
21 22 < 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 >
23 24 < / form >
24 25 < / details >
25 26 {{end}}
27 < section class = "setcard" >
26 28 < ul class = "milestonelist" >
27 29 {{range .Milestones}}< li >
28 30 < div class = "msmain" >
@@ -38,4 +40,6 @@
38 40 < / li >
39 41 {{else}}< li class = "empty" > no {{if ne .State "all"}}{{.State}} {{end}}milestones< / li > {{end}}
40 42 < / ul >
43 < / section >
44 < / div >
41 45 {{end}}
internal/web/templates/orglabels.html
+20 −12
@@ -1,11 +1,16 @@
1 1 {{define "title"}}labels · {{.Org}}{{end}}
2 2 {{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 >
4 8 {{if .Notice}}< p class = "error" role = "alert" > {{.Notice}}< / p > {{end}}
5 9 < 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 >
9 14 < td > < span class = "chip label" style = "{{index $.LabelColors .Name}}" > {{.Name}}< / span > < / td >
10 15 < td > {{if $.CanAdmin}}< form method = "post" action = "/{{$.Org}}/-/labels" class = "inline" >
11 16 < input type = "hidden" name = "name" value = "{{.Name}}" >
@@ -14,14 +19,16 @@
14 19 < / form > {{else}}< span class = "mono" > {{if .Color}}{{.Color}}{{else}}—{{end}}< / span > {{end}}< / td >
15 20 < td > {{.Issues}}< / td >
16 21 < 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}}
23 30 < / tr >
24 {{end}}< / table > < / div >
31 {{end}}< / tbody > < / table > < / div >
25 32 {{else}}< p class = "none" > No org labels yet.< / p > {{end}}
26 33 {{if .CanAdmin}}
27 34 < details class = "editbox" >
@@ -31,9 +38,10 @@
31 38 < input type = "text" id = "labelname" name = "name" maxlength = "50" required >
32 39 < label for = "labelcolor" > Colour< / label >
33 40 < 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 >
35 42 < / form >
36 43 < / details >
37 44 < 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 >
38 45 {{end}}
46 < / section >
39 47 {{end}}
internal/web/templates/orgmilestones.html
+11 −7
@@ -1,13 +1,14 @@
1 1 {{define "title"}}milestones · {{.Org}}{{end}}
2 2 {{define "content"}}
3 < div class = "listhead" >
3 < div id = "milestones-root" >
4 < div class = "pagehead" >
4 5 < 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 >
10 6 < / 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 >
11 12 {{if .Notice}}< p class = "error" role = "alert" > {{.Notice}}< / p > {{end}}
12 13 {{if .CanAdmin}}
13 14 < details class = "editbox" >
@@ -19,11 +20,12 @@
19 20 < input type = "text" id = "msdesc" name = "description" >
20 21 < label for = "msdue" > Due< / label >
21 22 < 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 >
23 24 < / form >
24 25 < / details >
25 26 {{end}}
26 27 < p class = "meta" > Progress spans the repositories under {{.Org}} you can read.< / p >
28 < section class = "setcard" >
27 29 < ul class = "milestonelist" >
28 30 {{range .Milestones}}< li >
29 31 < div class = "msmain" >
@@ -39,4 +41,6 @@
39 41 < / li >
40 42 {{else}}< li class = "empty" > no {{if ne .State "all"}}{{.State}} {{end}}org milestones< / li > {{end}}
41 43 < / ul >
44 < / section >
45 < / div >
42 46 {{end}}
internal/web/templates/refs.html
+21 −5
@@ -1,13 +1,29 @@
1 1 {{define "title"}}refs · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
2 2 {{define "content"}}
3 < h1 > Refs< / h1 >
3 < div class = "pagehead" >
4 < h1 > Refs< / h1 >
5 < / div >
6 < section class = "setcard" >
4 7 < form method = "get" action = "/{{.Repo.OwnerName}}/{{.Repo.Name}}/compare" class = "compareform" >
5 8 < label > Compare < input name = "base" value = "{{.Repo.DefaultBranch}}" size = "14" aria-label = "Compare base ref" autocomplete = "off" spellcheck = "false" > < / label >
6 9 < label > with < input name = "head" size = "14" placeholder = "branch, tag or sha" aria-label = "with head ref" autocomplete = "off" spellcheck = "false" > < / label >
7 10 < button type = "submit" class = "btn" > Compare< / button >
8 11 < / 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 >
13 29 {{end}}