-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.tpl.html
63 lines (61 loc) · 2.8 KB
/
index.tpl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Syncthing Roadmap Voting</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style type="text/css">
.very-muted {
color: #ccc;
}
</style>
</head>
<body>
<div class="container">
<h1>Roadmap Issues</h1>
{{if .Authenticated}}
<p>
You are voting as {{.User}}. You can <a href="/logout">log out</a>.
</p>
{{else}}
<p>
You can <a href="/authenticate">authenticate with
GitHub</a> to vote. (We will request "user profile" and
"public repositories" access scope because that's the
minimum to be able to post votes.) You can also vote
directly on GitHub using the 👍 reaction, though it'll
take about an hour to reflect here.
</p>
{{end}}
<hr>
{{range $i, $issue := .Issues}}
<div class="row d-flex align-items-center" id="issue-{{$issue.Number}}">
<div class="col-2 col-md-1 text-center"><h1 class="very-muted display-4">{{add 1 $i}}</h1></div>
<div class="col-2 col-md-1 text-center"><h2>
{{if $.Authenticated}}
{{if $.UserHasVoted $issue.GetNumber $.User}}
<a href="/unvote/{{$issue.Number}}">
<span class="text-success">▲</span><br>
<span class="text-success"><b>{{$.Votes $issue.Number}}</b></span>
</a>
{{else}}
<a href="/vote/{{$issue.Number}}">
<span class="very-muted">▲</span><br>
<span class="text-muted">{{$.Votes $issue.Number}}</span>
</a>
{{end}}
{{else}}
<span class="very-muted">▲</span><br>
{{$.Votes $issue.Number}}
{{end}}
</h2></div>
<div class="col">
<h4>{{$issue.Title}} <span class="text-muted">(<a class="text-muted" href="{{$issue.HTMLURL}}">#{{$issue.Number}}</a>)</span></h4>
{{$.RenderBody $issue}}
</div>
</div>
<hr>
{{end}}
</div>
</body>
</html>