add jinja templating code for basic table

This commit is contained in:
Xevion
2020-06-19 17:36:57 -05:00
parent 1a4779d8d5
commit 69534cfdc9

View File

@@ -3,8 +3,86 @@
<head>
<meta charset="UTF-8">
<title>Index</title>
<style>
/*.fixed_headers {*/
/*width: 750px;*/
/*table-layout: fixed;*/
/* border-collapse: collapse;*/
/*}*/
.fixed_headers th {
text-decoration: underline;
}
.fixed_headers th,
.fixed_headers td {
font-family: arial, serif;
font-weight: bold;
/*padding: 5px;*/
text-align: left;
}
/*.fixed_headers td:nth-child(1),*/
/*.fixed_headers th:nth-child(1) {*/
/* min-width: 200px;*/
/*}*/
/*.fixed_headers td:nth-child(2),*/
/*.fixed_headers th:nth-child(2) {*/
/* min-width: 200px;*/
/*}*/
/*.fixed_headers td:nth-child(3),*/
/*.fixed_headers th:nth-child(3) {*/
/* width: 350px;*/
/*}*/
.fixed_headers thead {
background-color: #333;
color: #FDFDFD;
}
/*.fixed_headers thead tr {*/
/* display: block;*/
/* position: relative;*/
/*}*/
/*.fixed_headers tbody {*/
/* display: block;*/
/* overflow: auto;*/
/* width: 100%;*/
/* height: 300px;*/
/*}*/
.fixed_headers tbody tr:nth-child(even) {
background-color: #DDD;
}
</style>
</head>
<body>
<table class="fixed_headers" style="height:100%;width:100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0;">
<thead>
<tr>
<th>Rank</th>
<th>Team Name</th>
{% for i in range(scoreCount) %}
<th>{{ i + 1 }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for team in teams %}
<tr>
<td>{{ range(1, teams | length) | random }}</td>
<td>{{ team.name }}</td>
{% for score in team.scores %}
<td>{{ score }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>