Created
November 23, 2015 19:40
-
-
Save daleysoftware/ea9cb96119c885e9f452 to your computer and use it in GitHub Desktop.
Hack Week Display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var target_date = new Date("Nov 25, 2015 3:30 pm").getTime(); | |
var days, hours, minutes, seconds; | |
var countdown = document.getElementById("countdown"); | |
setInterval(function () { | |
var current_date = new Date().getTime(); | |
var seconds_left = (target_date - current_date) / 1000; | |
days = Math.max(0, parseInt(seconds_left / 86400)); | |
seconds_left = seconds_left % 86400; | |
hours = Math.max(0, parseInt(seconds_left / 3600)); | |
seconds_left = seconds_left % 3600; | |
minutes = Math.max(0, parseInt(seconds_left / 60)); | |
seconds = Math.max(0, parseInt(seconds_left % 60)); | |
countdown.innerHTML = days + "d, " + hours + "h, " + minutes + "m, " + seconds + "s"; | |
}, 1000); | |
}; | |
</script> | |
<title>AeroFS Hackathon</title> | |
<style type="text/css"> | |
body { | |
background: #3394C9; | |
color: #FFF; | |
font-size: large; | |
} | |
a:hover { | |
text-shadow: white 0 0 0.2em | |
} | |
h1, h2 { | |
text-shadow: black 0.2em 0.2em 0.2em; | |
} | |
body, html { | |
height: 100%; margin: 0; padding: 0 | |
} | |
div.ctop { | |
top: 0%; left: 0; width: 100%; height: 40%; | |
display: table | |
} | |
div.cbottom { | |
top: 50%; left: 0; width: 100%; height: 30%; | |
display: table | |
} | |
#heavy { | |
display: table-cell; | |
vertical-align: bottom; | |
text-align: center; | |
} | |
#light { | |
display: table-cell; | |
vertical-align: top; | |
text-align: center; | |
} | |
</style> | |
</head> | |
<body> | |
<div class=ctop> | |
<h1 id="heavy"><u>Hack Week</u></h1> | |
</div> | |
<br/> | |
<div class=cbottom> | |
<h2 id="light">Time Remaining: <span id="countdown"></span></h2> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment