forked from ohmlaws/resistor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffline.html
More file actions
118 lines (112 loc) · 3.25 KB
/
offline.html
File metadata and controls
118 lines (112 loc) · 3.25 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Oops! No Internet</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #122028;
color: #ffffff;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 90vh;
margin: 0;
}
@keyframes bounceShadow {
0%, 100% {
box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.2);
}
50% {
box-shadow: 0px 10px 20px rgba(255, 255, 255, 0.2);
}
}
.container {
max-width: 400px;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
text-align: center;
/* Apply only the shadow animation */
animation: bounceShadow 1.5s infinite ease-in-out;
}
.exclamation-wrapper {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
}
.exclamation {
width: 60px;
height: 60px;
background: #ffcc00;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
font-weight: bold;
color: #121212;
animation: bounce 1.5s infinite;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-8px); }
}
h1 {
font-size: 26px;
margin: 10px 0;
color: #ffcc00;
}
p {
font-size: 16px;
margin-bottom: 20px;
opacity: 0.9;
}
.retry-button {
background-color: #ff9800;
color: #121212;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: background 0.3s;
}
.retry-button:hover {
background-color: #e68900;
}
.hidden {
display: none;
}
</style>
</head>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<div class="container">
<div class="exclamation-wrapper">
<div class="exclamation">!</div>
</div>
<h1>No Internet Connection!</h1>
<p>Dude, head back to civilization<br>that’s where the connection is!</p>
<button class="retry-button" onclick="retryConnection()">Try Again</button>
<p id="onlineMessage" class="hidden">You're back online! Reloading...</p>
</div>
<script>
function retryConnection() {
location.reload();
}
window.addEventListener('online', function() {
let message = document.getElementById("onlineMessage");
message.classList.remove("hidden");
setTimeout(() => {
location.reload();
}, 2000);
});
</script>
</body>
</html>