Difference between revisions of "Team:KU Leuven/HP/HP Main"

Line 1: Line 1:
 
{{KU_Leuven}}
 
{{KU_Leuven}}
 +
<!DOCTYPE HTML>
 
<html>
 
<html>
 
<head>
 
<head>
 
<style>
 
<style>
p {
+
p {
  text-align: center;
+
  text-align: center;
  font-size: 60px;
+
  font-size: 60px;
}
+
}
 
</style>
 
</style>
 
</head>
 
</head>
 
<body>
 
<body>
 
<p id="demo"></p>
 
 
 
<script>
 
<script>
// Set the date we're counting down to
+
<p id="demo"></p>
var countDownDate = new Date("Nov 9, 2017 00:00:00").getTime();
+
  
// Update the count down every 1 second
+
<script>
var x = setInterval(function() {
+
// Set the date we're counting down to
 +
var countDownDate = new Date("Nov 9, 2017 00:00:00").getTime();
  
    // Get todays date and time
+
// Update the count down every 1 second
    var now = new Date().getTime();
+
var x = setInterval(function() {
   
+
 
    // Find the distance between now an the count down date
+
// Get todays date and time
    var distance = countDownDate - now;
+
var now = new Date().getTime();
   
+
    // Time calculations for days, hours, minutes and seconds
+
// Find the distance between now an the count down date
    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
+
var distance = countDownDate - now;
    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+
    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
+
// Time calculations for days, hours, minutes and seconds
    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
+
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
   
+
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
    // Output the result in an element with id="demo"
+
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
    document.getElementById("demo").innerHTML = days + "d " + hours + "h "
+
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
    + minutes + "m " + seconds + "s ";
+
   
+
// Output the result in an element with id="demo"
    // If the count down is over, write some text  
+
document.getElementById("demo").innerHTML = days + "d " + hours + "h "
    if (distance < 0) {
+
+ minutes + "m " + seconds + "s ";
        clearInterval(x);
+
        document.getElementById("demo").innerHTML = "EXPIRED";
+
// If the count down is over, write some text  
    }
+
if (distance < 0) {
}, 1000);
+
clearInterval(x);
 +
document.getElementById("demo").innerHTML = "EXPIRED";
 +
}
 +
}, 1000);
 
</script>
 
</script>
  
 
</body>
 
</body>
 
</html>
 
</html>
 +
  
 
{{KU_Leuven_footer}}
 
{{KU_Leuven_footer}}

Revision as of 11:04, 30 August 2017

<!DOCTYPE HTML>