-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
67 lines (65 loc) · 1.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>HATEOAS but Client-Side and Offline</title>
<script>
navigator.serviceWorker
.register("/sw.js", {
scope: " /",
})
.then((registration) => {
if (registration.active) {
location.reload();
}
if (registration.installing) {
registration.installing.addEventListener("statechange", (e) => {
if (e.target.state === "activated") {
location.reload();
}
});
}
});
</script>
<style>
#container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
gap: 16px;
}
#container > div {
width: 16px;
height: 16px;
background: hsl(44, 100%, 59%);
animation: 1s fade linear infinite;
}
#container > div:nth-child(3) {
animation-delay: -200ms;
}
#container > div:nth-child(2) {
animation-delay: -100ms;
}
@keyframes fade {
0% {
opacity: 0.2;
}
50% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
</style>
</head>
<body>
<div id="container">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>