group outdated software and reword

Implements: https://todo.sr.ht/~amolith/willow/17
Implements: https://todo.sr.ht/~amolith/willow/15
This commit is contained in:
Amolith 2023-11-06 18:58:28 -05:00
parent 90db8d55ea
commit 1fbf0af5a4
Signed by: Amolith
GPG Key ID: 8AE30347CE28D101
1 changed files with 30 additions and 20 deletions

View File

@ -21,27 +21,37 @@
<h1>Willow &nbsp;&nbsp;&nbsp;<span><a href="/logout">Log out</a></span></h1> <h1>Willow &nbsp;&nbsp;&nbsp;<span><a href="/logout">Log out</a></span></h1>
<p><a href="/new">Track a new project</a></p> <p><a href="/new">Track a new project</a></p>
<div class="projects"> <div class="projects">
<!-- Range through projects that aren't yet up-to-date -->
{{- range . -}} {{- range . -}}
<div class="project"> {{- if ne .Running (index .Releases 0).Tag -}}
<h2><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span><a href="/new?action=delete&url={{ .URL }}">Delete?</a></span></h2> <div class="project">
<p>Currently running {{ .Running }}.</p> <h2><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span><a href="/new?action=delete&url={{ .URL }}">Delete?</a></span></h2>
{{- if ne .Running (index .Releases 0).Tag -}} <p>You've selected {{ .Running }}. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Modify?</a></p>
<p>New release available: <a href="{{ (index .Releases 0).URL }}">{{ (index .Releases 0).Tag }}</a>. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Update?</a></p> <p>Latest: <a href="{{ (index .Releases 0).URL }}">{{ (index .Releases 0).Tag }}</a></p>
<p> <p>
<details> <details>
<summary>Expand release notes</summary> <summary>Expand release notes</summary>
{{- if eq .Forge "github" "gitea" "forgejo" -}} {{- if eq .Forge "github" "gitea" "forgejo" -}}
{{- (index .Releases 0).Content -}} {{- (index .Releases 0).Content -}}
{{- else -}} {{- else -}}
<pre> <pre>
{{- (index .Releases 0).Content -}} {{- (index .Releases 0).Content -}}
</pre> </pre>
{{- end -}} {{- end -}}
</details> </details>
</p> </p>
{{- end -}}
</div>
{{- end -}}
</div> </div>
{{- end -}}
{{- end -}}
<!-- Range through projects that _are_ up-to-date -->
{{- range . -}}
{{- if eq .Running (index .Releases 0).Tag -}}
<div class="project">
<h2><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span style="font-size: 12px;"><a href="/new?action=delete&url={{ .URL }}">Delete?</a></span></h2>
<p>You've selected {{ .Running }}. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Modify?</a></p>
</div>
{{- end -}}
{{- end -}}
</body> </body>
</html> </html>