select-release.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/styles.css" as="style" />
18        <link rel="stylesheet" href="/static/styles.css" />
19    </head>
20    <body class="wrapper">
21        <h1>Willow</h1>
22        <form method="post">
23            <div class="input">
24                <p>Which release of {{ .Name }} are you currently running?</p>
25                {{- $url := .URL -}}
26                {{- $forge := .Forge -}}
27                {{- $running := .Running -}}
28                {{- range .Releases -}}
29                <input type="radio" id="{{ .Tag }}" name="release" value="{{ .Tag }}" {{- if eq $running .Tag }} checked {{- end -}}>
30                {{- if ne .URL "" -}}
31                <label for="{{ .Tag }}"><a href="{{ .URL }}">{{ .Tag }}</a></label><br>
32                {{- else -}}
33                {{- if eq $forge "sourcehut" -}}
34                <label for="{{ .Tag }}"><a href="{{ $url }}/refs/{{ .Tag }}">{{ .Tag }}</a></label><br>
35                {{- else if eq $forge "gitlab" -}}
36                <label for="{{ .Tag }}"><a href="{{ $url }}/-releases/{{ .Tag }}">{{ .Tag }}</a></label><br>
37                {{- else -}}
38                <label for="{{ .Tag }}">{{ .Tag }}</label><br>
39                {{- end -}}
40                {{- end -}}
41                {{- end -}}
42            </div>
43            <input type="hidden" name="url" value="{{ .URL }}">
44            <input type="hidden" name="name" value="{{ .Name }}">
45            <input type="hidden" name="forge" value="{{ .Forge }}">
46            <input type="hidden" name="id" value="{{ .ID }}">
47            <input class="button" type="submit" formaction="/new" value="Track releases">
48        </form>
49        <!-- Append these if they ever start limiting RSS entries: `(eq $forge "gitea") (eq $forge "forgejo")` -->
50        {{- if or (eq $forge "github") -}}
51        <small>Some RSS feeds (notably GitHub's) include a limited number of releases. If you don't see your version, please change the forge type to "Other".</small>
52        {{- end -}}
53    </body>
54</html>