-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffline.html
More file actions
85 lines (83 loc) · 2.19 KB
/
offline.html
File metadata and controls
85 lines (83 loc) · 2.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>You're Offline | TaskExtreme</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f5f7fa;
color: #333;
text-align: center;
padding: 20px;
}
.offline-container {
max-width: 500px;
padding: 40px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.offline-icon {
font-size: 64px;
color: #64748b;
margin-bottom: 20px;
}
h1 {
color: #1e293b;
margin-bottom: 16px;
}
p {
color: #64748b;
line-height: 1.6;
margin-bottom: 24px;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #3b82f6;
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: background-color 0.2s;
}
.btn:hover {
background-color: #2563eb;
}
</style>
</head>
<body>
<div class="offline-container">
<div class="offline-icon">
<i class="fas fa-wifi-slash"></i>
</div>
<h1>You're Offline</h1>
<p>It seems you're not connected to the internet. TaskExtreme needs an internet connection to load this page. Please check your connection and try again.</p>
<a href="/" class="btn">
<i class="fas fa-home"></i> Return Home
</a>
</div>
<script>
// Try to reload when coming back online
function handleOnline() {
window.location.reload();
}
// Add event listener for online event
window.addEventListener('online', handleOnline);
// Check if we're back online periodically
setInterval(() => {
if (navigator.onLine) {
window.location.reload();
}
}, 5000);
</script>
</body>
</html>