mirror of
https://github.com/Xevion/trivia.git
synced 2025-12-06 03:16:47 -06:00
add jinja templating code for basic table
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user