Skip to content

Commit 4da62fc

Browse files
authored
Create comingsoon.html
1 parent bc8201c commit 4da62fc

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<style>
4+
body, html {
5+
height: 100%;
6+
margin: 0;
7+
}
8+
9+
.bgimg {
10+
background-image: url('/w3images/forestbridge.jpg');
11+
height: 100%;
12+
background-position: center;
13+
background-size: cover;
14+
position: relative;
15+
color: white;
16+
font-family: "Courier New", Courier, monospace;
17+
font-size: 25px;
18+
}
19+
20+
.topleft {
21+
position: absolute;
22+
top: 0;
23+
left: 16px;
24+
}
25+
26+
.bottomleft {
27+
position: absolute;
28+
bottom: 0;
29+
left: 16px;
30+
}
31+
32+
.middle {
33+
position: absolute;
34+
top: 50%;
35+
left: 50%;
36+
transform: translate(-50%, -50%);
37+
text-align: center;
38+
}
39+
40+
hr {
41+
margin: auto;
42+
width: 40%;
43+
}
44+
</style>
45+
<body>
46+
47+
<div class="bgimg">
48+
<div class="topleft">
49+
<p>Logo</p>
50+
</div>
51+
<div class="middle">
52+
<h1>COMING SOON</h1>
53+
<hr>
54+
<p id="demo" style="font-size:30px"></p>
55+
</div>
56+
<div class="bottomleft">
57+
<p>Some text</p>
58+
</div>
59+
</div>
60+
61+
<script>
62+
// Set the date we're counting down to
63+
var countDownDate = new Date("Jan 5, 2021 15:37:25").getTime();
64+
65+
// Update the count down every 1 second
66+
var countdownfunction = setInterval(function() {
67+
68+
// Get todays date and time
69+
var now = new Date().getTime();
70+
71+
// Find the distance between now an the count down date
72+
var distance = countDownDate - now;
73+
74+
// Time calculations for days, hours, minutes and seconds
75+
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
76+
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
77+
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
78+
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
79+
80+
// Output the result in an element with id="demo"
81+
document.getElementById("demo").innerHTML = days + "d " + hours + "h "
82+
+ minutes + "m " + seconds + "s ";
83+
84+
// If the count down is over, write some text
85+
if (distance < 0) {
86+
clearInterval(countdownfunction);
87+
document.getElementById("demo").innerHTML = "EXPIRED";
88+
}
89+
}, 1000);
90+
</script>
91+
92+
</body>
93+
</html>

0 commit comments

Comments
 (0)