tablice-czasowe/za-10min.html

84 lines
2.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<link rel="shortcut icon" href="./theme/ico/favicon.ico" >
<link rel="stylesheet" href="./theme/css/bootstrap.min.css" >
<link rel="stylesheet" href="./theme/icons/all-icons.css" type="text/css" media="screen" />
<link rel="stylesheet" href="./theme/fonts/all-fonts.css" type="text/css" media="screen" />
<link rel="stylesheet" href="./theme/css/main.css" >
<script src="./theme/js/jquery-3.4.1.min.js" ></script>
<script src="./theme/js/popper.min.js" ></script>
<script src="./theme/js/bootstrap.min.js" ></script>
<meta name="author" content="Piotr Czaja" />
<meta name="keywords" content="projekt repozytorium" />
<meta name="description" content="Odliczanie do rozpoczęcia zajęć" />
<title>Rozpoczęcie</title>
<script>
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) {
document.getElementById("odliczacz").innerHTML = "<h1 class='font-weight-bold'>Zajęcia za chwilę się rozpoczną.</h1><hr/><p>Proszę o wyciszenie i zajęcie miejsc.</p></div>"
}
}, 1000);
}
window.onload = function () {
var fiveMinutes = 60 * 10,
display = document.querySelector('#time');
startTimer(fiveMinutes, display);
};
</script>
</head>
<body
<div class="container">
<div class="jumbotron mt-3">
<div id="odliczacz"> <h1> Zajęcia rozpoczną się za:</h1><hr/>
<div class="progress">
<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
<p class="text-center" style="font-size:600%;"> <span id="time">10:00</span></p>
<div class="progress">
<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
</div></div>
<div id='audio'></div>
<script type='text/javascript'>
$(document).ready(function (){
$("#audio").stop("true").delay('422000').queue(function() {
$(this).html('<audio autoplay="autoplay"><source src="GongPrzedSpotkaniem.mp3" type="audio/mp3" /></audio>');
});
});
</script>
</body>
</html>