summaryrefslogtreecommitdiff
path: root/rust/templates/leaderboard.html
blob: 82992d1cbdee1d25dde4a6fee47e2bdcebdcb10f (plain)
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
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Leaderboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        table {
            width: 80%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid black;
        }

        th, td {
            padding: 15px;
            text-align: left;
        }

        th {
            background-color: #f2f2f2;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        .success {
            background-color: green;
        }

        .fail {
            background-color: red;
        }
    </style>
</head>

<body>
  <h1>Leaderboard</h1>
  <table>
    <tr><th>Name</th><th>Grade</th><th>Last test</th></tr>
    {{#each this.clients}}
    <tr><td>{{this.name}}</td><td>{{this.grade}}</td><td class="{{#if this.success}}success{{else}}fail{{/if}}">{{this.last_query}}</td></tr>
    {{/each}}
  </table>
</body>
</html>