diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-10-10 18:23:02 +0200 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-10-10 18:23:02 +0200 |
| commit | 653c7d93e9f8ecae78bdd2d884cce59041b11202 (patch) | |
| tree | 2b26c78932d97a1f7619a925614fd5efcabf9dd3 /rust/templates | |
| parent | c511c31fe25045b46a57b11201704ff55207e808 (diff) | |
| download | lambda-nantes-653c7d93e9f8ecae78bdd2d884cce59041b11202.tar.gz | |
Improve leaderboard to add timestamp and result
Diffstat (limited to 'rust/templates')
| -rw-r--r-- | rust/templates/leaderboard.html | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/rust/templates/leaderboard.html b/rust/templates/leaderboard.html index f062323..82992d1 100644 --- a/rust/templates/leaderboard.html +++ b/rust/templates/leaderboard.html @@ -2,14 +2,48 @@ <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></tr> + <tr><th>Name</th><th>Grade</th><th>Last test</th></tr> {{#each this.clients}} - <tr><td>{{this.name}}</td><td>{{this.grade}}</td></tr> + <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> |
