diff options
Diffstat (limited to 'html/fruitvote/templates')
-rw-r--r-- | html/fruitvote/templates/stats.html | 17 | ||||
-rw-r--r-- | html/fruitvote/templates/vote.html | 28 |
2 files changed, 45 insertions, 0 deletions
diff --git a/html/fruitvote/templates/stats.html b/html/fruitvote/templates/stats.html new file mode 100644 index 0000000..c5fea5c --- /dev/null +++ b/html/fruitvote/templates/stats.html @@ -0,0 +1,17 @@ +<table> + <tr> + <th>picture</th> + <th>name</th> + <th>elo</th> + </tr> + {{ range . }} + <tr> + <td><img src="{{ .Img }}" alt="{{ .Name }}" width="100" height="100"></td> + <td>{{ .Name }}</td> + <td>{{ .Elo }}</td> + </tr> + {{ end }} +</table> +<br /> +<a href="/~simponic/fruitvote">back</a> +<br /> diff --git a/html/fruitvote/templates/vote.html b/html/fruitvote/templates/vote.html new file mode 100644 index 0000000..6bc27df --- /dev/null +++ b/html/fruitvote/templates/vote.html @@ -0,0 +1,28 @@ + +<form method="POST"> + <div class="fruitvote"> + {{ range $i, $fruit := . }} + {{ if $i }} + <div class="versus"> + <h1>OR</h1> + </div> + {{ end }} + <label class="contestant"> + <input type="radio" name="winner" value="{{ .Name }}" {{ if eq $i 0 }} checked {{ end }} /> + <div> + <img src="{{ .Img }}" alt="image" /> + <p>{{ .Name }}</p> + </div> + </label> + <input type="hidden" name="contestant[]" value="{{ .Name }}" /> + {{ end }} + </div> + <br /> + <div> + <input type="submit" value="Vote" /> + </div> +</form> +<br /> +<div><a href="/~simponic/fruitvote"><button>Skip</button></a></div> +<br /> +<div><a href="/~simponic/fruitvote/stats">view rankings!</a></div> |