Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Make releases and channels peer H1 sections

0bc4bc33836b89429fdbdb969083ad899407e927 · Keenan Nemetz · 15d ago · parent 1999687c

Make releases and channels peer H1 sections

Both lists now have their own H1 header, subtitle, and action. Releases comes
first with the New release button; Channels follows with the New channel
button. The two are separated by a rule, and each keeps the compact header
scale a repository page uses so neither reads as a subheading of the other.

The count line is gone. "1 tag(s)" said nothing about what a release or a
channel is, so the subtitles explain that instead: annotated tags with notes,
files, and source archives; channels as a stable name for a release.

The empty states stay region-level, and the test now pins the section order,
both H1s, both subtitles, and which header owns which action.

Closes 01M7QSTRTDSAAH7MW0YC1G1TD3.

server/web/templates/releases.html +48−47

@@ -2,54 +2,16 @@
2 2 {{template "header" .}}
3 3 {{template "repohead" (nav .Page "releases")}}
4 4
5 <div class="page-head">
6 <div class="page-head-main">
7 <h1>Releases</h1>
8 <p class="page-sub">{{if .Tags}}{{len .Tags}} tag(s){{if .Lightweight}} · {{.Lightweight}} lightweight{{end}}{{else}}Tags with notes, artifacts, and archives.{{end}}{{if .Channels}} · {{len .Channels}} channel(s){{end}}</p>
9 </div>
10 {{if .CanManage}}<div class="page-head-actions">
11 {{if .ManageChannels}}<a class="button secondary" href="/{{.Name}}/releases/channels/new">{{icon "plus"}}New channel</a>{{end}}
12 <a class="button" href="/{{.Name}}/releases/new">{{icon "plus"}}New release</a>
13 </div>{{end}}
14 </div>
15
16 {{if or .Channels .ManageChannels}}
17 <section id="channels">
18 <h2>Channels</h2>
19 <p class="muted">A channel is a stable name for the release it currently points at.
20 Its URL serves that release's attached files.</p>
21 {{if .Channels}}
22 <div class="panel">
23 <table>
24 <tr><th>Channel</th><th>Release</th><th>Updated</th><th>Description</th>{{if .ManageChannels}}<th></th>{{end}}</tr>
25 {{range .Channels}}
26 <tr>
27 <td><a href="/{{$.Name}}/channels/{{.Name}}"><code>{{.Name}}</code></a></td>
28 <td>{{if .Dangling}}<span class="label">dangling</span> <span class="muted">{{.Release}}</span>{{else}}<a href="/{{$.Name}}/releases/{{esc .Target}}">{{.Target}}</a>{{end}}</td>
29 <td class="muted">{{if .UpdatedBy}}{{.UpdatedBy}} · {{end}}{{since .UpdatedAt.Unix}}</td>
30 <td class="md">{{.Body}}</td>
31 {{if $.ManageChannels}}<td class="muted">
32 <a href="/{{$.Name}}/releases/channels/edit?channel={{urlquery .Name}}">edit</a>
33 <form method="post" action="/{{$.Name}}/channels/{{.Name}}/clear" class="inline" data-confirm="Clear the {{.Name}} channel? The release and its files stay.">
34 <input type="hidden" name="csrf" value="{{$.CSRF}}">
35 <button class="link" type="submit">clear</button>
36 </form>
37 </td>{{end}}
38 </tr>
39 {{end}}
40 </table>
41 </div>
42 {{else}}
43 <div class="empty-state">
44 <p>No channels yet.</p>
45 <p class="muted">Create one to publish a release's files at a URL that stays put.</p>
5 <section id="releases" class="release-section">
6 <div class="page-head release-head">
7 <div class="page-head-main">
8 <h1>Releases</h1>
9 <p class="page-sub">Annotated tags with notes, attached files, and source archives. Lightweight tags are listed too.</p>
10 </div>
11 {{if .CanManage}}<div class="page-head-actions">
12 <a class="button" href="/{{.Name}}/releases/new">{{icon "plus"}}New release</a>
13 </div>{{end}}
46 14 </div>
47 {{end}}
48 </section>
49 {{end}}
50
51 <section id="releases">
52 <h2>Releases</h2>
53 15 {{if .Tags}}
54 16 <div class="panel">
55 17 <table>
@@ -80,6 +42,45 @@ git push --follow-tags</pre>
80 42 records a tagger and a message, which is what makes a tag a release.</p>
81 43 {{end}}
82 44 </section>
45
46 <section id="channels" class="release-section">
47 <div class="page-head release-head">
48 <div class="page-head-main">
49 <h1>Channels</h1>
50 <p class="page-sub">A stable name for a release, so its files stay at one URL when the release moves.</p>
51 </div>
52 {{if .ManageChannels}}<div class="page-head-actions">
53 <a class="button secondary" href="/{{.Name}}/releases/channels/new">{{icon "plus"}}New channel</a>
54 </div>{{end}}
55 </div>
56 {{if .Channels}}
57 <div class="panel">
58 <table>
59 <tr><th>Channel</th><th>Release</th><th>Updated</th><th>Description</th>{{if .ManageChannels}}<th></th>{{end}}</tr>
60 {{range .Channels}}
61 <tr>
62 <td><a href="/{{$.Name}}/channels/{{.Name}}"><code>{{.Name}}</code></a></td>
63 <td>{{if .Dangling}}<span class="label">dangling</span> <span class="muted">{{.Release}}</span>{{else}}<a href="/{{$.Name}}/releases/{{esc .Target}}">{{.Target}}</a>{{end}}</td>
64 <td class="muted">{{if .UpdatedBy}}{{.UpdatedBy}} · {{end}}{{since .UpdatedAt.Unix}}</td>
65 <td class="md">{{.Body}}</td>
66 {{if $.ManageChannels}}<td class="muted">
67 <a href="/{{$.Name}}/releases/channels/edit?channel={{urlquery .Name}}">edit</a>
68 <form method="post" action="/{{$.Name}}/channels/{{.Name}}/clear" class="inline" data-confirm="Clear the {{.Name}} channel? The release and its files stay.">
69 <input type="hidden" name="csrf" value="{{$.CSRF}}">
70 <button class="link" type="submit">clear</button>
71 </form>
72 </td>{{end}}
73 </tr>
74 {{end}}
75 </table>
76 </div>
77 {{else}}
78 <div class="empty-state">
79 <p>No channels yet.</p>
80 <p class="muted">A channel gives a release's files a URL that stays put.</p>
81 </div>
82 {{end}}
83 </section>
83 84 {{template "footer" .}}
84 85 {{end}}
85 86