-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
67 lines (63 loc) · 2.27 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="robots" content="noindex,nofollow">
<title>Countdown to Shrikrishnan's Wedding</title>
<link href="https://fonts.googleapis.com/css?family=Nova+Mono&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Nova Mono', monospace;
background-color: #121212;
color: #ffffff;
text-align: center;
margin: 0;
padding: 0;
}
.text {
font-size: 32px;
color: #e51313;
letter-spacing: 2px;
}
.container {
width: 100%;
max-width: 600px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div class="container">
<h1>Countdown to Shrikrishnan's Wedding</h1>
<div id="countdown" class="text"></div>
</div>
<script>
// Set the date we're counting down to
var countDownDate = new Date("Sep 07, 2022 06:08:00").getTime();
// Update the countdown every 1 second
var x = setInterval(function () {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the countdown date
var distance = countDownDate - now;
// Time calculations for hours, minutes, and seconds
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);
// Display the result in the element with id="countdown"
if (distance > 0) {
document.getElementById("countdown").innerHTML =
hours + ":" + minutes + ":" + seconds;
} else {
clearInterval(x);
document.getElementById("countdown").innerHTML = "The Big Day Has Arrived!";
}
}, 1000); // Update every second
</script>
</body>
</html>