2017-01-26 22:32:27 +00:00
|
|
|
{% extends "layout_banned.html" %}
|
|
|
|
{% block content %}
|
2017-01-29 16:29:26 +00:00
|
|
|
<h1>Tu es tranché</h1>
|
2017-01-26 22:32:27 +00:00
|
|
|
<p>
|
|
|
|
{{ explanation }}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Rétablissement de la connexion externe dans approximativement :
|
|
|
|
</p>
|
|
|
|
<p style="text-align: center">
|
2017-01-29 17:44:32 +00:00
|
|
|
<strong><span id="time">30:00</span></strong>.
|
2017-01-26 22:32:27 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
(redémarrer le navigateur peut être nécessaire une fois ce délai écoulé)
|
|
|
|
</p>
|
2017-01-29 16:29:26 +00:00
|
|
|
|
|
|
|
<script type='text/javascript'>
|
2017-01-29 17:44:32 +00:00
|
|
|
function startTimer(duration, display) {
|
|
|
|
var timer = duration, minutes, seconds;
|
|
|
|
setInterval(function () {
|
|
|
|
minutes = parseInt(timer / 60, 10)
|
|
|
|
seconds = parseInt(timer % 60, 10);
|
|
|
|
|
|
|
|
minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
|
|
seconds = seconds < 10 ? "0" + seconds : seconds;
|
|
|
|
|
|
|
|
display.textContent = minutes + ":" + seconds;
|
|
|
|
|
|
|
|
if (--timer < 0) {
|
|
|
|
timer = duration;
|
|
|
|
}
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
|
2017-01-29 16:29:26 +00:00
|
|
|
window.onload = function () {
|
2017-01-29 16:57:16 +00:00
|
|
|
var fiveMinutes = {{ timeleft }},
|
2017-01-29 16:29:26 +00:00
|
|
|
display = document.querySelector('#time');
|
|
|
|
startTimer(fiveMinutes, display);
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2017-01-26 22:32:27 +00:00
|
|
|
{% endblock %}
|