home.html

 1<!--
 2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
 3
 4SPDX-License-Identifier: Apache-2.0
 5-->
 6
 7<!DOCTYPE html>
 8<html lang="en-GB">
 9    <head>
10        <title>Willow</title>
11        <meta name="viewport" content="width=device-width, initial-scale=1.0">
12        <meta name="title" content="Willow">
13        <meta name="description" content="Willow">
14        <style>
15html {
16  max-width: 500px;
17  margin: auto auto;
18}
19.project {
20  border: 2px solid #ccc;
21  border-radius: 5px;
22  padding: 10px;
23  margin-bottom: 10px;
24  background: #f8f8f8;
25}
26.project > h2 {
27  margin: 16px 0 0 0;
28}
29.project > h2 > span {
30  float: right;
31}
32    </style>
33    </head>
34    <body>
35        <h1>Willow</h1>
36        <p><a href="/new">Track a new project</a></p>
37        {{- range . -}}
38        <div class="project">
39            <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>
40            <p>Currently running {{ .Running }}.</p>
41            {{- if ne .Running (index .Releases 0).Tag -}}
42                <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>
43                <p>
44                    <details>
45                        <summary>Expand release notes</summary>
46                        {{- if eq .Forge "github" "gitea" "forgejo" -}}
47                            {{- (index .Releases 0).Content -}}
48                        {{- else -}}
49                            <pre>
50                            {{- (index .Releases 0).Content -}}
51                            </pre>
52                        {{- end -}}
53                    </details>
54                </p>
55            {{- end -}}
56        </div>
57        {{- end -}}
58    </body>
59</html>