-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
110 lines (106 loc) · 3.67 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Down for Maintenance</title>
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:100, 300,400,500,600,700&display=swap" rel="stylesheet">
<style>
html {
font-family: Nunito Sans,sans-serif;
}
.w-full {
width: 100%;
}
.h-full {
height: 100%;
}
.text-center {
text-align: center;
}
.flex {
display: flex;
}
.flex-col {
flex-direction: column;
}
.justify-center {
justify-content: center;
}
.items-center {
align-items: center;
}
.gap-6 {
gap: 1.5rem;
}
.text-5xl {
font-size: 3rem;
line-height: 1.1;
}
.w-full.md\:w-2/3 {
width: 100%;
}
.text-2xl {
font-size: 1.5rem;
line-height: 1.3;
margin-bottom: 1rem;
}
.p {
margin: 10px 0;
}
.logo {
margin: 2rem 0;
}
#countdown {
font-weight: bold;
}
</style>
</head>
<body>
<section class="w-full h-full text-center flex flex-col justify-center items-center gap-6">
<div class="logo">
<img src="https://cdn.crisiscleanup.org/static/images/ccu-logo-black-500w.png" alt="Logo" height="200">
</div>
<div class="text-5xl">We'll be back soon</div>
<div class="w-full md:w-2/3 text-2xl">
<p>We are currently down for some scheduled (or, perhaps unscheduled) maintenance.</p>
<p>We will be back online in: <span id="countdown"></span></p>
<p>If anything unusual is happening, we will update our <a href="https://www.facebook.com/CrisisCleanup" target = "_blank">Facebook page</a> with details.</p>
<p>In the meantime, let's both just take a moment to appreciate just how awesome you are... Yep, you're awesome.</p>
<p>— The Team</p>
</div>
</section>
<script>
///////////////////////////////////////////////////////////////////////
// Set the deadline date and time
///////////////////////////////////////////////////////////////////////
const deadline = new Date("2023-08-19T10:02:11+00:00").getTime();
///////////////////////////////////////////////////////////////////////
const countdownElement = document.getElementById("countdown");
const countdownInterval = setInterval(updateCountdown, 1000);
function getFormattedTimeDiff(remainingTime) {
// If the countdown has expired, show a message
if (remainingTime < 0) {
clearInterval(countdownInterval);
return 'Production is back online! <a href="https://www.crisiscleanup.org/">Log in</a>';
}
// Calculate days, hours, minutes, and seconds
const padWithZero = (n) => n < 10 ? `0${n}` : n;
const days = Math.floor(remainingTime / (1000 * 60 * 60 * 24));
const hours = Math.floor((remainingTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((remainingTime % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((remainingTime % (1000 * 60)) / 1000);
const d = padWithZero(days)
const h = padWithZero(hours)
const m = padWithZero(minutes)
const s = padWithZero(seconds)
return `${d} days ${h} hours ${m} minutes ${s} seconds`;
}
function updateCountdown() {
const now = new Date().getTime();
const diff = deadline - now;
countdownElement.innerHTML = getFormattedTimeDiff(diff);
}
</script>
</body>
</html>