mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2025-12-10 00:48:35 +01:00
wip: index & mapnames
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
dt = $('#tableMain').DataTable({
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '/data-source',
|
||||
url: '/data-source/{{ map_uid }}',
|
||||
type: 'POST'
|
||||
},
|
||||
"columnDefs": [
|
||||
|
||||
28
templates/head.html
Normal file
28
templates/head.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Image factory providing automatically resized and re-encoded images.">
|
||||
<meta name="author" content="Yannik Schmidt">
|
||||
<meta name="title" content="TM Replays">
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Trackmania Replay Server" />
|
||||
<meta property="og:description" content="TM Replay Server developed by Yannik Schmidt" />
|
||||
<meta property="og:url" content="/" />
|
||||
|
||||
<link rel="shortcut icon" href="/defaultFavicon.ico">
|
||||
|
||||
|
||||
<!-- Bootstrap core JS -->
|
||||
<script src="https://cdn.atlantishq.de/js/jquery.min.js"></script>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="https://cdn.atlantishq.de/fontawesome/css/all.css" rel="stylesheet">
|
||||
<link href="https://cdn.atlantishq.de/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script defer src="https://cdn.atlantishq.de/js/bootstrap.min.js"></script>
|
||||
<script defer src="https://cdn.atlantishq.de/js/addons/datatables.min.js"></script>
|
||||
|
||||
<!-- mdb -->
|
||||
<link href="https://cdn.atlantishq.de/css/mdb.min.css" rel="stylesheet">
|
||||
<script defer src="https://cdn.atlantishq.de/js/mdb.min.js"></script>
|
||||
|
||||
</head>
|
||||
31
templates/index.html
Normal file
31
templates/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<head>
|
||||
{% include "head.html" %}
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-2">Map</th>
|
||||
{% if player %}
|
||||
<th class="px-2">Personal Best</th>
|
||||
{% endif %}
|
||||
<th class="px-2">Record</th>
|
||||
<th class="px-2">Record Age</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for map in maps %}
|
||||
<tr>
|
||||
<td class="px-2">
|
||||
<a href="/map-info?map_uid={{ map.map_uid }}">{{ map.mapname }}</a>
|
||||
</td>
|
||||
{% if player %}
|
||||
<td class="px-2">{{ map.get_best_for_player(player) }}</td>
|
||||
{% endif %}
|
||||
<td class="px-2">{{ map.get_best_replay_repr() }}</td>
|
||||
<td class="px-2">{{ map.get_best_replay_age() }} days</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
@@ -1,30 +1,5 @@
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Image factory providing automatically resized and re-encoded images.">
|
||||
<meta name="author" content="Yannik Schmidt">
|
||||
<meta name="title" content="TM Replays">
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Trackmania Replay Server" />
|
||||
<meta property="og:description" content="TM Replay Server developed by Yannik Schmidt" />
|
||||
<meta property="og:url" content="/" />
|
||||
|
||||
<link rel="shortcut icon" href="/defaultFavicon.ico">
|
||||
|
||||
|
||||
<!-- Bootstrap core JS -->
|
||||
<script src="https://cdn.atlantishq.de/js/jquery.min.js"></script>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="https://cdn.atlantishq.de/fontawesome/css/all.css" rel="stylesheet">
|
||||
<link href="https://cdn.atlantishq.de/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script defer src="https://cdn.atlantishq.de/js/bootstrap.min.js"></script>
|
||||
<script defer src="https://cdn.atlantishq.de/js/addons/datatables.min.js"></script>
|
||||
|
||||
<!-- mdb -->
|
||||
<link href="https://cdn.atlantishq.de/css/mdb.min.css" rel="stylesheet">
|
||||
<script defer src="https://cdn.atlantishq.de/js/mdb.min.js"></script>
|
||||
|
||||
{% include "head.html" %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "datatable.html" %}
|
||||
|
||||
Reference in New Issue
Block a user