Repository navigation
Expand file tree
/
Copy pathlegends.html
More file actions
44 lines (44 loc) · 1.59 KB
/
Copy pathlegends.html
File metadata and controls
44 lines (44 loc) · 1.59 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
<!DOCTYPE html>
<html>
<head>
<title>Minecraft Legends Countdown</title>
<style>
html {
background: url(legends.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#countdown {
font-family: monospace;
font-size: 3.5em;
text-align: center;
-webkit-text-stroke: 2px white;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
<script src="jquery.min.js"></script>
</head>
<body>
<h1 id="countdown">Loading...</h1>
<script>
var releaseDate = new Date("April 18, 2023 16:00:00");
var updateCountdown = setInterval(function(){
var timeNow = new Date().getTime();
var timeUntil = releaseDate - timeNow;
var daysUntil = Math.floor(timeUntil / (1000 * 60 * 60 * 24));
var hoursUntil = Math.floor((timeUntil % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutesUntil = Math.floor((timeUntil % (1000 * 60 * 60)) / (1000 * 60));
var secondsUntil = Math.floor((timeUntil % (1000 * 60)) / 1000);
if (timeUntil > 0) { $("#countdown").html(daysUntil + "d " + hoursUntil + "h " + minutesUntil + "m " + secondsUntil + "s<br>Until Minecraft Legends Is Released"); }
else { $("countdown").html("Minecraft Legends Has Released!"); clearInterval(updateCountdown); }
},1000);
</script>
</body>
</html>