42 lines
1 KiB
HTML
42 lines
1 KiB
HTML
{% extends "layout_banned.html" %}
|
|
{% block content %}
|
|
<h1>Tu es tranché</h1>
|
|
<p>
|
|
{{ explanation }}
|
|
</p>
|
|
<p>
|
|
Rétablissement de la connexion externe dans approximativement :
|
|
</p>
|
|
<p style="text-align: center">
|
|
<strong><span id="time">30:00</span></strong>.
|
|
</p>
|
|
<p>
|
|
(redémarrer le navigateur peut être nécessaire une fois ce délai écoulé)
|
|
</p>
|
|
|
|
<script type='text/javascript'>
|
|
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);
|
|
}
|
|
|
|
window.onload = function () {
|
|
var fiveMinutes = {{ timeleft }},
|
|
display = document.querySelector('#time');
|
|
startTimer(fiveMinutes, display);
|
|
};
|
|
</script>
|
|
|
|
{% endblock %}
|