results.html
3.88 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!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>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid drop-shadow">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<!-- <img class="brand" alt="UEvora" src="/pomba-ue.svg"/> -->
UEvora
</a>
</div>
<!-- <p class="navbar-text"> ${t['title']} </p> -->
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="/test">Teste</a></li>
<li class="active"><a href="/resultados">Resultados</a></li>
</ul>
</div>
</div>
</nav>
<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>
% if loop.index == 0:
<img src="\crown.jpg" />
%endif
${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>