-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcountdownarma.html
123 lines (108 loc) · 4.42 KB
/
countdownarma.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
121
122
123
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.cdnfonts.com/css/tektur-tight" rel="stylesheet">
<link href="https://tacxtv.github.io/armadesdons/Legionary.ttf" rel="stylesheet">
<title>ARMA PUB</title>
<style>
:root{
--sclr: #C01C01;
}
@font-face {
font-family: 'Legionary';
font-style: normal;
font-weight: 400;
src: local('Legionary'), url('https://tacxtv.github.io/armadesdons/Legionary.ttf') format('ttf');
}
html, body {
width: auto;
height: auto;
}
body { background-color: rgba(0, 0, 0, 0); margin: 0 auto; overflow: hidden; position: relative; }
.countdown {
margin: 0;
font-size: 48px;
/*noinspection CssNoGenericFontName*/
font-family: Legionary, 'Tektur Tight';
color: rgb(237, 224, 123);
text-shadow: 2px 0 0 #af0900, -2px 0 0 #af0900, 0 2px 0 #af0900, 0 -2px 0 #af0900, 1px 1px #af0900, -1px -1px 0 #af0900, 1px -1px 0 #af0900, -1px 1px 0 #af0900;
}
@media (min-width: 200px) {
.countdown {
font-size: 64px;
}
}
@media (min-width: 300px) {
.countdown {
font-size: 96px;
text-shadow: 3px 0 0 var(--sclr), -3px 0 0 var(--sclr), 0 3px 0 var(--sclr), 0 -3px 0 var(--sclr), 2px 2px var(--sclr), -2px -2px 0 var(--sclr), 2px -2px 0 var(--sclr), -2px 2px 0 var(--sclr);
}
}
@media (min-width: 400px) {
.countdown {
font-size: 128px;
}
}
@media (min-width: 600px) {
.countdown {
font-size: 164px;
text-shadow: 4px 0 0 var(--sclr), -4px 0 0 var(--sclr), 0 4px 0 var(--sclr), 0 -4px 0 var(--sclr), 2px 2px var(--sclr), -2px -2px 0 var(--sclr), 2px -2px 0 var(--sclr), -2px 2px 0 var(--sclr);
}
}
@media (min-width: 800px) {
.countdown {
font-size: 196px;
}
}
@media (min-width: 1000px) {
.countdown {
font-size: 256px;
text-shadow: 6px 0 0 var(--sclr), -6px 0 0 var(--sclr), 0 6px 0 var(--sclr), 0 -6px 0 var(--sclr), 4px 4px var(--sclr), -4px -4px 0 var(--sclr), 4px -4px 0 var(--sclr), -4px 4px 0 var(--sclr);
}
}
@media (min-width: 1200px) {
.countdown {
font-size: 512px;
text-shadow: 8px 0 0 var(--sclr), -8px 0 0 var(--sclr), 0 8px 0 var(--sclr), 0 -8px 0 var(--sclr), 6px 6px var(--sclr), -6px -6px 0 var(--sclr), 6px -6px 0 var(--sclr), -6px 6px 0 var(--sclr);
}
}
</style>
</head>
<body>
<p id="countdown" class="countdown">--:--:--</p>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
let countdown
const params = new URLSearchParams(document.location.search);
const utc = parseInt(params.get('utc'), 10) || 1;
const fuseau = 11 + utc;
const countDownDate = new Date(`Nov 28, 2021 ${fuseau}:00:00`).getTime();
const interfunc = function () {
const now = new Date().getTime();
const distance = countDownDate - now;
if (distance < 0) {
document.getElementById("countdown").innerHTML = `00:00:00`;
clearInterval(countdown)
return
}
let hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
if (hours < 10) hours = `0${hours}`;
let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
if (minutes < 10) minutes = `0${minutes}`;
let seconds = Math.floor((distance % (1000 * 60)) / 1000);
if (seconds < 10) seconds = `0${seconds}`;
document.getElementById("countdown").innerHTML = `${hours}:${minutes}:${seconds}`;
}
const init = setTimeout(function() {
interfunc();
countdown = setInterval(interfunc, 1000);
clearTimeout(init);
}, 1000);
});
</script>
</body>
</html>