-
Notifications
You must be signed in to change notification settings - Fork 0
/
ladder_template.html
72 lines (64 loc) · 2.11 KB
/
ladder_template.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<title>TouchType Table Tennis Tracker</title>
<link rel="stylesheet" type="text/css" href="stylesheets/main.css"/>
<script type='text/javascript' src='http://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages':['corechart']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'x');
{% for person in ordered_people %}
data.addColumn('number', '{{ person }}');
{% endfor %}
data.addRows([
{% for line in ranking_timeline_data %}
{{ line }}
{% endfor %}
]);
document.getElementById('chart_div').style.height = '100%';
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data,
{ curveType: 'function',
interpolateNulls: true,
chartArea: {
left: 0,
top: 30,
width: "85%",
height: "100%",
},
vAxis: {
baselineColor: 'white',
direction: -1,
gridlines: { color: 'white' },
textStyle: { color: 'white' },
},
});
}
</script>
</head>
<body>
<div id='chart_div' style='width: 100%;'></div>
<p style="text-align: center"> Hello {{ user }}, how are you doing? Any new matches to tell me about? </p>
<form class="boxinput" action="" method="post">
<input type="text" name="new_result"/>
</form>
<table border="1" cellpadding="8">
<th>Rank</th>
<th>Name</th>
<th>Wins</th>
<th>Losses</th>
<th>Latest News</th>
{% for player in rankings %}
<tr>
<td>{{ player.rank }}</td>
<td>{{ player.user }}</td>
<td>{{ player.wins }}</td>
<td>{{ player.loss }}</td>
<td>{{ player.news }}</td>
</tr>
{% endfor %}
</table>
</body>
</html>