flask-python-helm/templates/_playerRecordResults.html
2020-09-11 21:02:04 +08:00

91 lines
2.7 KiB
HTML

<doctype html>
<head>
<title>List of players from 2018/19 season - Python Flask MySQL app</title>
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
</head>
<style>
tbody td {
border: 1px solid #ccc;
padding: 0px 0px;
}
th.rotate {
/* Something you can count on */
height: 120px;
white-space: nowrap;
}
th.rotate > div {
transform:
/* Magic Numbers */
translate(23px, 0px)
/* 45 is really 360 - 45 */
rotate(315deg);
width: 30px;
}
th.rotate > div > span {
border-bottom: 1px solid #ccc;
padding: 0px 0px;
}
</style>
<body>
<p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</p>
<table class="table table-striped table-hover table-condensed">
<thead>
{%- for column in columns %}
{% if column['Field'] == "playerNumber" %}
<th><div><span>Player Number</span></div></th>
{% elif column['Field'] == "playerName" %}
<th><div><span>Player Name</span></div></th>
{% elif column['Field'] == "appearances" %}
<th><div><span>Appearances</span></div></th>
{% elif column['Field'] == "goals" %}
<th><div><span>Goals</span></div></th>
{% elif column['Field'].startswith('22381goal') %}
<th class="rotate"><div><span>NBC A goals</span></div></th>
{% else %}
{%- for match in matchesList %}
{% if column['Field'].startswith(match) %}
{% if column['Field'].endswith('played') %}
<th class="rotate"><div><span>{{ matches[match] }} Played</span></div></th>
{% elif column['Field'].endswith('goals') %}
<th class="rotate"><div><span>{{ matches[match] }} Goals</span></div></th>
{% elif column['Field'].endswith('capt') %}
<th class="rotate"><div><span>{{ matches[match] }} Captain</span></div></th>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{%- endfor %}
</thead>
<tbody>
{%- for row in rows %}
<tr>
{%- for column in columns %}
<td>{{ row[column['Field']] }}</td>
{%- endfor %}
</tr>
{%- endfor %}
</tbody>
</table>
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
</body>