blob: 65649b3d1242ad5ce702508e146a74467a8ebb16 (
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
|
//- vim:ts=4:sw=4:
doctype html
html
head
include head
title Game Statistics
style.
table { min-width: auto; margin-bottom: 30px; }
td:not(:first-child) { text-align: right; }
th:not(:first-child) { text-align: right; }
td:not(:first-child) { width: 50px; }
td:first-child { width: 400px; }
body
include header
article
h1 Game Statistics
- function p(t,r) { return r > 0 ? Math.round(r*100/t) + "%" : "" }
each row in stats
table
thead
tr
th
a(href="/"+row.title_id)= row.title_name
unless row.scenario === "Standard"
| , #{row.scenario}
unless row.options === "None"
| , #{row.options}
th= row.total
tbody
- for (let i=0; i<row.result_role.length; ++i)
- let role = row.result_role[i]
- let count = row.result_count[i]
tr
td= role
td= p(row.total,count)
|