Last active
August 29, 2015 14:03
-
-
Save vladholubiev/2dbc4292e0426142e0f7 to your computer and use it in GitHub Desktop.
Waiting for EIT results
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>До оголошення результатів ЗНО залишилося...</title> | |
<link rel="stylesheet" href="style.css"> | |
<meta property="og:image" content="http://osvita.ua/doc/images/news/8/822/UCYAO_c_i.jpg"> | |
<link rel="icon" href="favicon.png"> | |
<meta charset="utf-8"> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/lang/en-gb.js"></script> | |
</head> | |
<body> | |
<div id="timer"></div> | |
<div class="descr">залишилося до оголошення результатів ЗНО 2014 із української мови, математики, географії та російської мови.</div> | |
<br> | |
<div class="descr"><a href="http://testportal.gov.ua/infopages" target="_blank">Інформаційна сторінка</a></div> | |
<script src="script.js"></script> | |
</body> | |
</html> |
This file contains 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
setInterval(function() { | |
var left = moment("2014-06-24T23:59:59.000").subtract(moment().hours(), 'hours') | |
.subtract(moment().minutes(), 'minutes') | |
.subtract(moment().seconds(), 'seconds') | |
.format('DD:HH:mm:ss'); | |
if (left.substr(0, 2) === '24') { | |
document.getElementById('timer').innerHTML = left.substr(3, left.length); | |
} else { | |
var el = document.getElementsByTagName("body")[0]; | |
el.className = el.className + " finally"; | |
document.getElementById('timer').innerHTML = '00:00:00'; | |
document.getElementsByClassName('descr')[0].innerHTML = 'Результати опубліковано! Відвідайте інформаційну сторінку:'; | |
} | |
}, 1000); |
This file contains 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
.finally { | |
background-image: url(http://i.imgur.com/Ce3BvrF.jpg); | |
background-repeat: no-repeat; | |
background-size: cover; | |
} | |
#timer { | |
margin: 0 auto; | |
width: 300px; | |
text-align: center; | |
font-size: 80px; | |
height: 100px; | |
} | |
.descr { | |
margin: 0 auto; | |
width: 600px; | |
text-align: center; | |
font-size: 16pt; | |
font-family: Georgia; | |
} | |
#timer { | |
-webkit-animation: fadein 6s; | |
-moz-animation: fadein 6s; | |
-ms-animation: fadein 6s; | |
-o-animation: fadein 6s; | |
animation: fadein 6s; | |
} | |
@keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-moz-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-webkit-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-ms-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
@-o-keyframes fadein { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment