-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
116 lines (95 loc) · 3.22 KB
/
index.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<meta name="keywords" content="Ravishankar Sivasubramaniam">
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ravishankar Sivasubramaniam - Hackathon Timer</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Monoton" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style>
html body {
font-family: 'Monoton', sans-serif;
background-color: white;
}
html,
body {
height: 100%;
}
body {
padding-top: 55px;
display: flex;
text-align: center;
flex-direction: column;
}
clock {
margin: auto;
padding: 25px;
flex: 1 0 auto;
max-width: 750px;
}
.now {
margin: 15px 0;
font-family: sans-serif;
}
.logo {
transform: translateY(22vh);
color: black;
font-size: 6vh;
}
.clock {
transform: translateY(22vh);
color: orangered;
font-size: 4vh;
}
</style>
<body>
<clock>
<div>
<p class="logo">Reinvent The Wheel 2.0</p>
<p class="clock" id="timer"></p>
</div>
</clock>
<footer>
<p class="now text-muted" id="now"></p>
<p class="now text-muted">Ravishankar Sivasubramaniam</p>
</footer>
</body>
</html>
<script>
// Set the date we're counting down to
var countDownDate = new Date("Mar 27, 2020 17:00:00").getTime();
// Update the count down every 1 second
var x = setInterval(function () {
// Get todays date and time
var now = new Date().getTime();
// console.log(new Date())
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("timer").innerHTML = days + "d " + hours + "h "
+ minutes + "m " + '<br>' + seconds + "s ";
document.getElementById("now").innerHTML = new Date();
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("timer").innerHTML = "-- : -- : --";
}
}, 1000);
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-119195186-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-119195186-3');
</script>