diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-09-12 23:56:45 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-09-13 20:06:36 +0200 |
commit | b1b753e317daa10e03a6a3b210d185539fac176b (patch) | |
tree | b389ae89f689af3a7d0fb77cb89d46271e18bfc5 /views/user_stats.pug | |
parent | 6407378d92eb8880e35e8ee33e1801136a1a44a7 (diff) | |
download | server-b1b753e317daa10e03a6a3b210d185539fac176b.tar.gz |
Calculate Elo ratings.
Primarily for use with future matchmaking system to provide better games for
everyone.
Show top 5 players of each game on the game pages.
Diffstat (limited to 'views/user_stats.pug')
-rw-r--r-- | views/user_stats.pug | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/views/user_stats.pug b/views/user_stats.pug index a947b64..dee2883 100644 --- a/views/user_stats.pug +++ b/views/user_stats.pug @@ -5,12 +5,11 @@ doctype html html head include head - title Stats for #{who.name} - style td:nth-child(n+4){text-align:right} + title Statistics for #{who.name} body include header article - h1 Stats for #{who.name} + h1 Statistics for #{who.name} table(style="min-width:auto") thead @@ -18,8 +17,8 @@ html th Title th Scenario th Role - th Played - th Won + th.r Played + th.r Won tbody each row in stats tr @@ -28,12 +27,27 @@ html td= row.title_name td= row.scenario td= row.role - td= row.total - td= Math.round(row.won*100/row.total) + "%" + td.r= row.total + td.r= Math.round(row.won*100/row.total) + "%" tfoot tr + td Overall td td - td - td= all_total - td= Math.round(all_won*100/all_total) + "%" + td.r= all_total + td.r= Math.round(all_won*100/all_total) + "%" + + table(style="min-width:auto") + thead + tr + th Title + th.r Rating + th.r Plays + th.r Last played + tbody + each row in ratings + tr + td= row.title_name + td.r= row.rating + td.r= row.count + td.r= row.last |