willow/ws/static/home.html

80 lines
3.8 KiB
HTML
Raw Normal View History

2023-09-21 18:03:21 +00:00
<!DOCTYPE html>
<html lang="en-GB">
<head>
<title>Willow</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Willow">
<meta name="description" content="Forge-agnostic software release tracker">
<!-- Indicate that we support both light and dark mode -->
<meta name="color-scheme" content="dark light">
<!-- Preload CSS reset -->
<link rel="preload" href="/static/reset.css" as="style" />
<link rel="stylesheet" href="/static/reset.css" />
<!-- Preload CSS styles -->
<link rel="preload" href="/static/styles.css" as="style" />
<link rel="stylesheet" href="/static/styles.css" />
2023-09-21 18:03:21 +00:00
</head>
<body>
<header class="wrapper">
<h1>Willow &nbsp;&nbsp;&nbsp;<span><a href="/logout">Log out</a></span></h1>
<p><a href="/new">Track a new project</a></p>
</header>
<div class="two_column">
<div class="projects">
<!-- Range through projects that aren't yet up-to-date -->
{{- range . -}}
{{- if ne .Running (index .Releases 0).Tag -}}
<h2>Outdated projects</h2>
{{- break -}}
{{- end -}}
{{- end -}}
{{- range . -}}
{{- if ne .Running (index .Releases 0).Tag -}}
<div id="{{ .ID }}" class="project card">
<h3><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span class="delete"><a href="/new?action=delete&url={{ .URL }}">Delete?</a></span></h3>
<p>You've selected {{ .Running }}. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Modify?</a></p>
<p>Latest: <a href="{{ (index .Releases 0).URL }}">{{ (index .Releases 0).Tag }}</a></p>
<p><a href="#{{ (index .Releases 0).ID }}">View release notes</a></p>
</div>
{{- end -}}
{{- end -}}
<!-- Range through projects that _are_ up-to-date -->
{{- range . -}}
{{- if eq .Running (index .Releases 0).Tag -}}
<h2>Up-to-date projects</h2>
{{- break -}}
{{- end -}}
{{- end -}}
{{- range . -}}
{{- if eq .Running (index .Releases 0).Tag -}}
<div class="project card">
<h3><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span class="delete"><a href="/new?action=delete&url={{ .URL }}">Delete?</a></span></h3>
<p>You've selected <a href="#{{ (index .Releases 0).ID }}">{{ .Running }}</a>. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Modify?</a></p>
</div>
{{- end -}}
{{- end -}}
</div>
<div class="release_notes">
<h2>Release notes</h2>
{{- range . -}}
<div id="{{ (index .Releases 0).ID }}" class="release_note card">
<h3>{{ .Name }}: release notes for <a href="{{ (index .Releases 0).URL }}">{{ (index .Releases 0).Tag }}</a> <span class="close"><a href="#">&#x2716;</a></span></h3>
{{- if eq .Forge "github" "gitea" "forgejo" -}}
{{- (index .Releases 0).Content -}}
{{- else -}}
<pre>
{{- (index .Releases 0).Content -}}
</pre>
{{- end -}}
<p><a class="return_to_project" href="#{{ .ID }}">Back to project</a></p>
</div>
{{- end -}}
</div>
</div>
2023-09-21 18:03:21 +00:00
</body>
</html>