-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaster-plan-v2.html
128 lines (107 loc) · 3.47 KB
/
master-plan-v2.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
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--=============== CSS ===============-->
<link rel="stylesheet" href="assets/css/styles.css">
<title>Master Plan v2</title>
</head>
<body>
<section class="coming-soon">
<div class="global__data">
<h2>Just a question of time...</h2>
<div class="countdown">
<div class="container-year">
<h3 class="year">xx</h3>
<p>Year</p>
</div>
<div class="container-day">
<h3 class="day">xx</h3>
<p>Day</p>
</div>
<div class="container-hour">
<h3 class="hour">xx</h3>
<p>Hour</p>
</div>
<div class="container-minute">
<h3 class="minute">xx</h3>
<p>Minute</p>
</div>
<div class="container-second">
<h3 class="second">xx</h3>
<p>Second</p>
</div>
</div>
</div>
<img src="assets/img/calendar-img.svg" alt="" class="img__calendar">
</section>
<style>
h2 {
font-size: 1.6rem;
font-weight: 600;
padding: 2rem;
}
.coming-soon {
min-height: 100vh;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.countdown {
display: flex;
justify-content: space-around;
text-align: center;
}
.year,
.day,
.hour,
.minute,
.second {
font-size: 2.5rem;
padding-bottom: .5rem;
}
.img__calendar {
height: 40vh;
padding-top: 4rem;
}
@media screen and (min-width: 992px) {
h2 {
font-size: 4rem;
padding: 3rem;
}
.img__calendar {
padding-top: 3rem;
}
}
</style>
<script>
const countdown = () => {
const countDate = new Date("September 1, 2025 00:00:00").getTime();
const now = new Date().getTime();
const gap = countDate - now;
// Time parameters
const second = 1000;
const minute = 60 * second;
const hour = 60 * minute;
const day = 24 * hour;
const years = 365.25 * day;
const textYear = Math.floor(gap / years);
const textDay = Math.floor((gap % years) / day);
const textHour = Math.floor((gap % day) / hour);
const textMinute = Math.floor((gap % hour) / minute);
const textSecond = Math.floor((gap % minute) / second);
// Afficher les données dans la page
document.querySelector(".year").innerHTML = textYear;
document.querySelector(".day").innerHTML = textDay;
document.querySelector(".hour").innerHTML = textHour;
document.querySelector(".minute").innerHTML = textMinute;
document.querySelector(".second").innerHTML = textSecond;
};
countdown();
setInterval(countdown, 1000);
</script>
</body>
</html>