results.html
2.9 KB
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
73
74
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> ${t['title']} </title>
<link rel="icon" href="favicon.ico">
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-theme.min.css"> <!-- optional -->
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<style>
/* Fixes navigation panel overlaying content */
body {
padding-top: 80px;
background: #aaa;
}
.drop-shadow {
-webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5);
box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2);
border-radius:5px;
}
</style>
</head>
<!-- ===================================================================== -->
<body>
<div class="container">
<div class="panel panel-default drop-shadow">
<div class="panel-heading">
${t['title']}
</div>
<!-- <div class="panel-body"> -->
<table class="table">
<thead>
<tr>
<th>Posição</th>
<th>Número</th>
<th>Nome</th>
<th>Nota (0-20)</th>
</tr>
</thead>
<tbody>
% for r in results:
<tr>
<td>${loop.index+1}</td>
<td>${r[0]}</td> <!-- numero -->
<td>${r[1]}</td> <!-- nome -->
<td> <!-- nota -->
<div class="progress">
% if r[2] < 10:
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;">
% elif r[2] < 15:
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;">
% else:
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;">
% endif
${'{:.1f}'.format(r[2])}
</div>
</div>
</td>
</tr>
% endfor
</tbody>
</table>
</div> <!-- panel -->
</div> <!-- container -->
</body>
</html>