diff options
author | Lizzy Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-10 16:45:26 -0600 |
---|---|---|
committer | Lizzy Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-10 16:45:26 -0600 |
commit | def61909c2423b19b063a5807cc399a41de39974 (patch) | |
tree | 0b035fbb1c29ac858b042092d183824f8bc1a5b5 /html/fruitvote/templates | |
parent | 5a85dd89bc82d8fc133c0e9a58859ae9b98dbe0f (diff) | |
download | tilde.club-def61909c2423b19b063a5807cc399a41de39974.tar.gz tilde.club-def61909c2423b19b063a5807cc399a41de39974.zip |
fruitvote
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> |