You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
4.0 KiB
122 lines
4.0 KiB
<html>
|
|
|
|
{% load static %}
|
|
<!--
|
|
<script>
|
|
// Set the date we're counting down to
|
|
var countDownDate = new Date("Jan 5, 2024 15:37:25").getTime();
|
|
|
|
// Update the count down every 1 second
|
|
var x = setInterval(function() {
|
|
|
|
// Get today's date and time
|
|
var now = new Date().getTime();
|
|
|
|
// Find the distance between now and the count down date
|
|
var distance = {{ match.seconds }} * -1;
|
|
|
|
// Time calculations for days, hours, minutes and seconds
|
|
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
|
|
|
// Display the result in the element with id="demo"
|
|
document.getElementById("demo").innerHTML = hours + "h "
|
|
+ minutes + "m " + seconds + "s ";
|
|
|
|
// If the count down is finished, write some text
|
|
if (distance < 0) {
|
|
clearInterval(x);
|
|
document.getElementById("demo").innerHTML = "Démarrage en cours...";
|
|
}
|
|
}, 1000);
|
|
</script> -->
|
|
|
|
<head>
|
|
<link rel="stylesheet" href="{% static 'scores/style.css' %}">
|
|
<title>Padel</title>
|
|
<meta http-equiv="refresh" content="15"/>
|
|
</head>
|
|
|
|
<div class="wrapper">
|
|
|
|
{% if club.header %}
|
|
<header class="center">{{ club.header }}</header>
|
|
{% endif %}
|
|
|
|
<main class="page-body">
|
|
|
|
<div class="container">
|
|
{% if matches %}
|
|
{% for match in matches %}
|
|
<div class="match">
|
|
|
|
<p><a href="/match/{{ match.id }}/">COURS #{{ match.court }}</a></p>
|
|
|
|
<h1>{{ match.title }}</h1>
|
|
|
|
{% if match.team3 %}
|
|
|
|
<table>
|
|
<tr><td>{{ match.team1 }}</td>
|
|
{% if match.team1scorecolumn1 %}<td class="score">{{ match.team1scorecolumn1 }}</td>{% endif %}
|
|
</tr>
|
|
<tr><td>{{ match.team2 }}</td>
|
|
{% if match.team1scorecolumn2 %}<td class="score">{{ match.team1scorecolumn2 }}</td>{% endif %}
|
|
</tr>
|
|
<tr><td>{{ match.team3 }}</td>
|
|
{% if match.team1scorecolumn3 %}<td class="score">{{ match.team1scorecolumn3 }}</td>{% endif %}
|
|
</tr>
|
|
<tr><td>{{ match.team4 }}</td>
|
|
{% if match.team1scorecolumn4 %}<td class="score">{{ match.team1scorecolumn4 }}</td>{% endif %}
|
|
</tr>
|
|
|
|
<tr><td>{{ match.team5 }}</td>
|
|
{% if match.team1scorecolumn5 %}<td class="score">{{ match.team1scorecolumn5 }}</td>{% endif %}
|
|
</tr>
|
|
</table>
|
|
{% else %}
|
|
|
|
<table>
|
|
<tr>
|
|
<td>{{ match.team1 }}</td>
|
|
{% if match.team1scorecolumn1 %}<td class="score">{{ match.team1scorecolumn1 }}</td>{% endif %}
|
|
{% if match.team1scorecolumn2 %}<td class="score">{{ match.team1scorecolumn2 }}</td>{% endif %}
|
|
{% if match.team1scorecolumn3 %}<td class="score">{{ match.team1scorecolumn3 }}</td>{% endif %}
|
|
{% if match.team1scorecolumn4 %}<td class="score">{{ match.team1scorecolumn4 }}</td>{% endif %}
|
|
{% if match.team1scorecolumn5 %}<td class="score">{{ match.team1scorecolumn5 }}</td>{% endif %}
|
|
</tr>
|
|
<tr>
|
|
<td>{{ match.team2 }}</td>
|
|
{% if match.team2scorecolumn1 %}<td class="score">{{ match.team2scorecolumn1 }}</td>{% endif %}
|
|
{% if match.team2scorecolumn2 %}<td class="score">{{ match.team2scorecolumn2 }}</td>{% endif %}
|
|
{% if match.team2scorecolumn3 %}<td class="score">{{ match.team2scorecolumn3 }}</td>{% endif %}
|
|
{% if match.team2scorecolumn4 %}<td class="score">{{ match.team2scorecolumn4 }}</td>{% endif %}
|
|
{% if match.team2scorecolumn5 %}<td class="score">{{ match.team2scorecolumn5 }}</td>{% endif %}
|
|
</tr>
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
<!-- <p id="demo"></p> -->
|
|
|
|
<p class="big">{{ match.duration }}</p>
|
|
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
<p class="center">Pas de matchs en cours...</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
</main>
|
|
|
|
{% if club.footer %}
|
|
<footer class="page-footer, center">{{ club.footer }}</footer>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</html>
|
|
|