parent
c10d57710f
commit
b8f793648b
@ -0,0 +1,18 @@ |
||||
# Generated by Django 4.2 on 2023-07-31 11:34 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('scores', '0020_match_haswalkoutteam'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='team', |
||||
name='position_finale', |
||||
field=models.IntegerField(default=0), |
||||
), |
||||
] |
||||
@ -0,0 +1,120 @@ |
||||
<html> |
||||
|
||||
{% load static %} |
||||
|
||||
<head> |
||||
{% if tv %} |
||||
|
||||
<script>history.scrollRestoration = "manual"</script> |
||||
<script src= |
||||
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"> |
||||
</script> |
||||
{% endif %} |
||||
|
||||
<link rel="stylesheet" href="{% static 'scores/style.css' %}"> |
||||
<title>Padel</title> |
||||
</head> |
||||
{% if tv %} |
||||
<div class="wrapper" style="zoom:200%"> |
||||
{% else %} |
||||
<div class="wrapper"> |
||||
{% endif %} |
||||
|
||||
{% if tv %} |
||||
<script> |
||||
|
||||
var iInterval = 2000; |
||||
var iScrollInterval = 10000; |
||||
var iFadeInterval = 500; |
||||
var iScroll = $(document).height() - $(window).height(); |
||||
|
||||
if (iScroll * 10 + 4000 < 15000) { |
||||
iScrollInterval = 10000; |
||||
} else { |
||||
iScrollInterval = iScroll * 10; |
||||
} |
||||
var fade = function() { |
||||
$("body").fadeOut(iFadeInterval, function(){ |
||||
$("html, body").scrollTop(0); |
||||
$("body").fadeIn(iFadeInterval,function(){ |
||||
setTimeout(loop, iInterval); |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
var loop = function() { |
||||
var iScroll = $(document).height() - $(window).height(); |
||||
if (iScroll * 10 + 4000 < 15000) { |
||||
iScrollInterval = 10000; |
||||
} else { |
||||
iScrollInterval = iScroll * 10; |
||||
} |
||||
$("html, body").animate({ |
||||
scrollTop: iScroll |
||||
}, { |
||||
duration : iScrollInterval, |
||||
easing : "linear", |
||||
complete : function() { |
||||
setTimeout(fade, iInterval); |
||||
} |
||||
}); |
||||
setTimeout(function(){ |
||||
window.location.reload(); |
||||
}, Math.max(iScrollInterval * 10 + 2000, 15000)); |
||||
}; |
||||
setTimeout(loop, iInterval); |
||||
</script> |
||||
{% endif %} |
||||
|
||||
{% if tournament.club.header %} |
||||
{% if tv %} |
||||
<header class="scenter"><a href="/tv/club/{{ tournament.club.name }}/">{{ tournament.club.header }}</a></header> |
||||
{% else %} |
||||
<header class="scenter"><a href="/club/{{ tournament.club.name }}/">{{ tournament.club.header }}</a></header> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
<main class="page-body"> |
||||
{% autoescape off %} |
||||
<div class="scenter"> |
||||
{% if tv %} |
||||
<h3><a href="tv/club/{{ tournament.club.name }}/tournoi/{{ tournament.id }}">{{ tournament.name }}</a> |
||||
{% else %} |
||||
<h3><a href="/club/{{ tournament.club.name }}/tournoi/{{ tournament.id }}">{{ tournament.name }}</a> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
<div class="scontainer"> |
||||
<div class="teams"> |
||||
<h1>Classement<h1> |
||||
<table> |
||||
<tr> |
||||
<th>Classement</th> |
||||
<th>Nom</th> |
||||
<th>Poids</th> |
||||
<th>Rang initial</th> |
||||
</tr> |
||||
{% for team in tournament.teamsByFinalRank %} |
||||
<tr height='100%' style="background-color:{{ team.background_color }};"> |
||||
<td class="score">#{{ team.position_finale }}</td> |
||||
<td class="name" width='40%'>{{ team.name|linebreaksbr }}</td> |
||||
<td class="score">{{ team.rank }}</td> |
||||
|
||||
<td class="name" width='20%'>{{ team.position }}</td> |
||||
</tr> |
||||
{% endfor %} |
||||
</table> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
{% endautoescape %} |
||||
</main> |
||||
|
||||
{% if tournament.club.footer %} |
||||
<footer class="page-footer, center">{{ tournament.club.footer }}</footer> |
||||
{% endif %} |
||||
|
||||
</div> |
||||
|
||||
</html> |
||||
Loading…
Reference in new issue