-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_counter.html
120 lines (119 loc) · 4.4 KB
/
index_counter.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
117
118
119
120
<!DOCTYPE html>
<!-- Če želiš dostop do beta strani k trenutnem URL-ju dodaj /beta -->
<!--For ULTIMATE LAZINESS COPY HERE https://hypixel.si/beta -->
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="https://hypixel.si/beta/img/logo.png" type="image/png">
<meta charset="utf-8">
<title>Hypixel Slovenija | prihaja kmalu..</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:url" content="https://hypixel.si" />
<meta property="og:title" content="Hypixel Slovenija" />
<meta property="og:description" content="Hypixel Slovenija je skupnost največjega Minecraft Serverja Hypixel. Namenjen je igranju z drugimi Slovenci, poleg tega pa tudi redno prirejamo Turnirje, Evente in imamo svoj Guild!" />
<meta property="og:image" content="https://hypixel.si/beta/img/logo.png" />
<meta content="#ffea54" data-react-helmet="true" name="theme-color" />
<meta name="keywords" content="Hypixel, HypixelSlovenija, Hypixel Slovenija, HypixelSLO, HypixelSlo, Hypixel-SLO, Hypixel-si, Hypixel Slovenia, Hypixel Slo, Hypixel.si, hypixel.si">
</head>
<body>
<div class="wrapper">
<div class="title">
Naša spletna stran <span>prihaja kmalu</span>, sledi nam za novice!
</div>
<!--<form action="#" class="form">
<div class="email-field">
<input type="email" placeholder="Vnes Email naslov" required>
<button type="submit">Naroči se</button>
</div>
</form> -->
<br>
<div class="count-down">
<div class="timer day">
<div class="count">
<div class="numb">
00
</div>
<div class="text">
Dni
</div>
</div>
</div>
<div class="clone">
:
</div>
<div class="timer hour">
<div class="count">
<div class="numb">
00
</div>
<div class="text">
Ur
</div>
</div>
</div>
<div class="clone">
:
</div>
<div class="timer min">
<div class="count">
<div class="numb">
00
</div>
<div class="text">
Minut
</div>
</div>
</div>
<div class="clone">
:
</div>
<div class="timer sec">
<div class="count">
<div class="numb">
00
</div>
<div class="text">
Sekund
</div>
</div>
</div>
</div>
<br>
10. oktober 2021 ob 16:00
</div>
<script>
const day = document.querySelector(".day .numb");
const hour = document.querySelector(".hour .numb");
const min = document.querySelector(".min .numb");
const sec = document.querySelector(".sec .numb");
var timer = setInterval(()=>{
var currentDate = new Date().getTime();
var launchDate = new Date('Oct 10, 2021 16:00:00').getTime();
var duration = launchDate - currentDate;
var days = Math.floor(duration / (1000 * 60 * 60 * 24));
var hours = Math.floor((duration % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((duration % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((duration % (1000 * 60)) / 1000);
day.innerHTML = days;
hour.innerHTML = hours;
min.innerHTML = minutes;
sec.innerHTML = seconds;
if(days < 10){
day.innerHTML = '0' + days;
}
if(hours < 10){
hour.innerHTML = '0' + hours;
}
if(minutes < 10){
min.innerHTML = '0' + minutes;
}
if(seconds < 10){
sec.innerHTML = '0' + seconds;
}
if(duration < 0){
clearInterval(timer);
}
}, 1000);
</script>
</body>
</html>