From ed0e6a2ae0dee1e9eb26466d0ffaaf73a3cdf445 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 27 Jan 2022 01:05:11 +0100 Subject: Show user stats per-role. --- views/user_stats.pug | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/user_stats.pug b/views/user_stats.pug index 70211ef..865e7fd 100644 --- a/views/user_stats.pug +++ b/views/user_stats.pug @@ -6,7 +6,7 @@ html head include head title Stats for #{who.name} - style td:nth-child(3),td:nth-child(4){text-align:right} + style td:nth-child(n+4){text-align:right} body include header article @@ -16,23 +16,27 @@ html tr th Title th Scenario + th Role + th Played th Won - th Total each row in stats tr - all_won += row.won - all_total += row.total td= row.title_name td= row.scenario - td= row.won + td= row.role td= row.total + td= Math.round(row.won*100/row.total) + "%" tr th th th th + th tr td td - td= Math.round(all_won * 100 / all_total) + "%" + td td= all_total + td= Math.round(all_won*100/all_total) + "%" -- cgit v1.2.3