|
|
|
|
@ -15,35 +15,43 @@ |
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="{% static 'scores/style.css' %}"> |
|
|
|
|
<title>Padel</title> |
|
|
|
|
{% if not tv %} |
|
|
|
|
<meta http-equiv="refresh" content="15"/> |
|
|
|
|
{% endif %} |
|
|
|
|
</head> |
|
|
|
|
|
|
|
|
|
<div class="wrapper"> |
|
|
|
|
{% if live_matches.count|add:ended_matches.count > 6 and auto_scrolling and tv %} |
|
|
|
|
{% if tv %} |
|
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
var iInterval = 2000; |
|
|
|
|
var iInterval = 4000; |
|
|
|
|
var iScrollInterval = 10000; |
|
|
|
|
var iFadeInterval = 500; |
|
|
|
|
var iScroll = $(document).height() - $(window).height(); |
|
|
|
|
|
|
|
|
|
var fade = function() { |
|
|
|
|
$("body").fadeOut(iFadeInterval, function(){ |
|
|
|
|
$("html, body").scrollTop(0); |
|
|
|
|
$("body").fadeIn(iFadeInterval,function(){ |
|
|
|
|
setTimeout(loop, iInterval); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
if (iScroll * 10 + 4000 < 15000) { |
|
|
|
|
iScrollInterval = 10000; |
|
|
|
|
} else { |
|
|
|
|
iScrollInterval = iScroll * 10; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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).scrollTop(0); |
|
|
|
|
window.location.reload(); |
|
|
|
|
}, iInterval); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
@ -59,20 +67,28 @@ |
|
|
|
|
{% autoescape off %} |
|
|
|
|
|
|
|
|
|
<div class="container"> |
|
|
|
|
{% if live_matches %} |
|
|
|
|
{% for match in live_matches %} |
|
|
|
|
{% if match.isMatch %} |
|
|
|
|
<div class="match"> |
|
|
|
|
|
|
|
|
|
<div style="width: 100%;"> |
|
|
|
|
<div style="float: left;"> |
|
|
|
|
<h3>{{ match.title }}</h3> |
|
|
|
|
{% if tv %} |
|
|
|
|
<h3>{{ match.title|default:"Match" }} | <a href="/tv/club/{{ match.tournament.club.name }}/tournoi/{{ match.tournament.id }}">{{match.tournament.name}}</a> |
|
|
|
|
{% else %} |
|
|
|
|
<h3>{{ match.title|default:"Match" }} | <a href="/club/{{ match.tournament.club.name }}/tournoi/{{ match.tournament.id }}">{{match.tournament.name}}</a> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
{% if match.isMatch or match.isBracket %} |
|
|
|
|
{% if match.isMatch %} |
|
|
|
|
{% if match.isMatch and match.court > 0 %} |
|
|
|
|
<div style="float: right;"> |
|
|
|
|
{% if tv %} |
|
|
|
|
<h3><a href="/tv/match/{{ match.id }}/">TERRAIN #{{ match.court }}</a><h3> |
|
|
|
|
{% else %} |
|
|
|
|
<h3><a href="/match/{{ match.id }}/">TERRAIN #{{ match.court }}</a><h3> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
{% else %} |
|
|
|
|
{% elif match.court > 0 %} |
|
|
|
|
<div style="float: right;"> |
|
|
|
|
<h3><a href="/match/{{ match.id }}/">POULE #{{ match.poule|floatformat:0 }}</a><h3> |
|
|
|
|
</div> |
|
|
|
|
@ -145,7 +161,7 @@ |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
<!-- <p id="demo"></p> --> |
|
|
|
|
{% if match.isMatch or match.isBracket %} |
|
|
|
|
{% if not match.isStatistic %} |
|
|
|
|
<p class="duration"> |
|
|
|
|
<div class="small"> {{ match.durationPrefix }}</div> |
|
|
|
|
<div class="big">{{ match.duration }}</div> |
|
|
|
|
@ -153,24 +169,27 @@ |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
{% if ended_matches %} |
|
|
|
|
{% for match in ended_matches %} |
|
|
|
|
{% if match.isMatch %} |
|
|
|
|
<div class="match"> |
|
|
|
|
|
|
|
|
|
<div style="width: 100%;"> |
|
|
|
|
<div style="float: left;"> |
|
|
|
|
<h3>{{ match.title }}</h3> |
|
|
|
|
<h3>{{ match.title|default:"Match" }}</h3> |
|
|
|
|
</div> |
|
|
|
|
{% if match.isMatch or match.isBracket %} |
|
|
|
|
{% if match.isMatch %} |
|
|
|
|
{% if match.isMatch and match.court > 0 %} |
|
|
|
|
<div style="float: right;"> |
|
|
|
|
{% if tv %} |
|
|
|
|
<h3><a href="/tv/match/{{ match.id }}/">TERRAIN #{{ match.court }}</a><h3> |
|
|
|
|
{% else %} |
|
|
|
|
<h3><a href="/match/{{ match.id }}/">TERRAIN #{{ match.court }}</a><h3> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
{% else %} |
|
|
|
|
{% elif match.court > 0 %} |
|
|
|
|
<div style="float: right;"> |
|
|
|
|
<h3><a href="/match/{{ match.id }}/">POULE #{{ match.poule|floatformat:0 }}</a><h3> |
|
|
|
|
</div> |
|
|
|
|
@ -247,13 +266,9 @@ |
|
|
|
|
<div class="big">{{ match.duration }}</div> |
|
|
|
|
</p> |
|
|
|
|
{% endif %} |
|
|
|
|
<div class="clear" /> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
{% endautoescape %} |
|
|
|
|
|