This repository was archived by the owner on Jul 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (54 loc) · 1.7 KB
/
Copy pathindex.html
File metadata and controls
64 lines (54 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/flipclock.css">
<!-- Custom stylesheet -->
<link rel="stylesheet" href="css/site.css">
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- Font Awesome -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="bg">
<div class="container">
<div class="col-md-12">
<h1>Hacks Incorporated</h1>
<h2>Upgrade Coming Soon</h2>
</div>
<div class="col-md-8 col-md-offset-2">
<div class="clock" style="margin:2em;"></div>
</div>
</div>
</div>
<script src="js/flipclock.js"></script>
<script type="text/javascript">
var clock;
$(document).ready(function() {
// Set dates.
var futureDate = new Date("August 19, 2016 12:02 PM EDT");
var currentDate = new Date();
// Calculate the difference in seconds between the future and current date
var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000;
// Calculate day difference and apply class to .clock for extra digit styling.
function dayDiff(first, second) {
return (second-first)/(1000*60*60*24);
}
if (dayDiff(currentDate, futureDate) < 100) {
$('.clock').addClass('twoDayDigits');
} else {
$('.clock').addClass('threeDayDigits');
}
if(diff < 0) {
diff = 0;
}
// Instantiate a coutdown FlipClock
clock = $('.clock').FlipClock(diff, {
clockFace: 'DailyCounter',
countdown: true
});
});
</script>
</body>
</html>