-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
65 lines (63 loc) · 2.06 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
<!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">
<title>Majavapaja</title>
<link rel="shortcut icon" type="image/png" href="./assets/favico.png"/>
<link rel="stylesheet" href="./styles.css">
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans|Roboto" rel="stylesheet">
</head>
<body>
<div>
<a class="logo" href="https://majavapaja.fi">
<img src="./assets/logo.png" />
<div class="title">Majavapaja</div>
<div class="slogan">Exactly as programmed</div>
</a>
</div>
<div class="content"></div>
<script>
const content = document.querySelector('.content')
const pageLoads = parseInt(localStorage.getItem('pageLoads')) || 0
const loadStamp = localStorage.getItem('loadStamp')
const loadDate = loadStamp ? new Date(parseInt(loadStamp)) : null
if (pageLoads === 0) {
content.innerText = `
Website coming soon!
Refresh the page, it might already be here!
`
localStorage.setItem('pageLoads', 1)
} else if (pageLoads === 1) {
content.innerText = `
Any minute now! I am sure of it!
`
localStorage.setItem('pageLoads', 2)
} else if (pageLoads === 2) {
content.innerText = `
Hmm, it's not here yet..
You could try refreshing again.
`
localStorage.setItem('pageLoads', 3)
} else if (pageLoads === 3) {
content.innerText = `
Between you and me,
I am starting to doubt that it will ever be released.
`
localStorage.setItem('pageLoads', 4)
} else if (pageLoads === 4) {
content.innerText = `
Honestly what's the point in checking?
Maybe come back tomorrow?
`
if (!loadDate) localStorage.setItem('loadStamp', Date.now())
}
if (loadDate && loadDate.setHours(0, 0, 0, 0) < new Date().setHours(0, 0, 0, 0)) {
content.innerText = `
What can I say.. It's still not here.
`
}
</script>
</body>
</html>