parent
f764754f55
commit
2e8c89fae0
@ -0,0 +1,23 @@ |
||||
# Generated by Django 4.2 on 2023-07-28 18:32 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('scores', '0018_rename_backgroundcolor_team_background_color_and_more'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='team', |
||||
name='match', |
||||
), |
||||
migrations.AddField( |
||||
model_name='team', |
||||
name='tournament', |
||||
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='scores.tournament'), |
||||
), |
||||
] |
||||
@ -0,0 +1,110 @@ |
||||
<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> |
||||
<meta http-equiv="refresh" content="15"/> |
||||
</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 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(); |
||||
$("html, body").animate({ |
||||
scrollTop: iScroll |
||||
}, { |
||||
duration : iScrollInterval, |
||||
easing : "linear", |
||||
complete : function() { |
||||
setTimeout(fade, iInterval); |
||||
} |
||||
}); |
||||
}; |
||||
setTimeout(loop, iInterval); |
||||
</script> |
||||
{% endif %} |
||||
|
||||
{% if tournament.club.header %} |
||||
<header class="scenter">{{ tournament.club.header }}</header> |
||||
{% endif %} |
||||
|
||||
<main class="page-body"> |
||||
{% autoescape off %} |
||||
<div class="scenter">{{ tournament.name }}</div> |
||||
|
||||
<div class="scontainer"> |
||||
<div class="teams"> |
||||
{% if tournament.teams %} |
||||
<h1>Liste des équipes<h1> |
||||
<table> |
||||
<tr> |
||||
<th>Rang</th> |
||||
<th>Nom</th> |
||||
<th>Poids</th> |
||||
<th>Entrée</th> |
||||
<th>Jour</th> |
||||
</tr> |
||||
{% for team in tournament.teams %} |
||||
<tr height='100%' style="background-color:{{ team.backgroundColor }};"> |
||||
<td class="score">#{{ team.position }}</td> |
||||
<td class="name" width='50%'>{{ team.name|linebreaksbr }}</td> |
||||
<td class="score">{{ team.rank }}</td> |
||||
|
||||
{% if team.bracket %} |
||||
<td class="name" width='20%'>Poule</td> |
||||
{% else %} |
||||
<td class="name" width='20%'>{{ team.positionLabel }}</td> |
||||
{% endif %} |
||||
|
||||
{% if team.dateLabel %} |
||||
<td class="name">{{ team.dateLabel }}</td> |
||||
{% else %} |
||||
<td class="name"> - </td> |
||||
{% endif %} |
||||
</tr> |
||||
{% endfor %} |
||||
</table> |
||||
{% endif %} |
||||
|
||||
</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