home.html

 1<!DOCTYPE html>
 2<html lang="en-GB">
 3    <head>
 4        <title>Willow</title>
 5        <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6        <meta name="title" content="Willow">
 7        <meta name="description" content="Forge-agnostic software release tracker">
 8
 9        <!-- Indicate that we support both light and dark mode -->
10        <meta name="color-scheme" content="dark light">
11
12        <!-- Preload CSS reset -->
13        <link rel="preload" href="/static/reset.css" as="style" />
14        <link rel="stylesheet" href="/static/reset.css" />
15
16        <!-- Preload CSS styles -->
17        <link rel="preload" href="/static/colours.css" as="style" />
18        <link rel="stylesheet" href="/static/colours.css" />
19        <link rel="preload" href="/static/styles.css" as="style" />
20        <link rel="stylesheet" href="/static/styles.css" />
21    </head>
22    <body>
23        <div class="container">
24        <header>
25            <div class="wrapper">
26                <h1>Willow</h1>
27                <nav>
28                    <a href="/new">Track a new project</a>
29                    <a href="/logout">Log out</a>
30                </nav>
31            </div>
32        </header>
33        <main>
34            <div class="wrapper two_column">
35            <div class="projects">
36                <!-- Range through projects that aren't yet up-to-date -->
37                {{- range . -}}
38                {{- if ne .Running (index .Releases 0).Tag -}}
39                <h2>Outdated projects</h2>
40                {{- break -}}
41                {{- end -}}
42                {{- end -}}
43                {{- range . -}}
44                {{- if ne .Running (index .Releases 0).Tag -}}
45                <div id="{{ .ID }}" class="project card">
46                    <h3><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span class="delete"><a href="/new?action=delete&id={{ .ID }}">Delete?</a></span></h3>
47                    <p>You've selected {{ .Running }}. <a href="/new?action=update&url={{ .URL }}&forge={{ .Forge }}&name={{ .Name }}">Modify?</a></p>
48                    <p>Latest: <a href="{{ (index .Releases 0).URL }}">{{ (index .Releases 0).Tag }}</a></p>
49                    <p><a href="#{{ (index .Releases 0).ID }}">View release notes</a></p>
50                </div>
51                {{- end -}}
52                {{- end -}}
53
54                <!-- Range through projects that _are_ up-to-date -->
55                {{- range . -}}
56                {{- if eq .Running (index .Releases 0).Tag -}}
57                <h2>Up-to-date projects</h2>
58                {{- break -}}
59                {{- end -}}
60                {{- end -}}
61                {{- range . -}}
62                {{- if eq .Running (index .Releases 0).Tag -}}
63                <div class="project card">
64                    <h3><a href="{{ .URL }}">{{ .Name }}</a>&nbsp;&nbsp;&nbsp;<span class="delete"><a href="/new?action=delete&id={{ .ID }}">Delete?</a></span></h3>
65                    <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>
66                </div>
67                {{- end -}}
68                {{- end -}}
69            </div>
70            <div class="release_notes">
71                <h2>Release notes</h2>
72                {{- range . -}}
73                <div id="{{ (index .Releases 0).ID }}" class="release_note card">
74                    <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>
75                    {{- if eq .Forge "github" "gitea" "forgejo" -}}
76                    {{- (index .Releases 0).Content -}}
77                    {{- else -}}
78                    <pre>
79                    {{- (index .Releases 0).Content -}}
80                    </pre>
81                    {{- end -}}
82                    <p><a class="return_to_project" href="#{{ .ID }}">Back to project</a></p>
83                </div>
84                {{- end -}}
85            </div>
86            </div>
87        </main>
88        <footer>
89            <div class="wrapper">
90                <p>Willow &mdash; <a href="https://git.sr.ht/~amolith/willow">SourceHut</a> &mdash; <a href="https://todo.sr.ht/~amolith/willow">Issues</a></p>
91            </div>
92        </footer>
93        </div>
94    </body>
95</html>