-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoffline.html
More file actions
176 lines (150 loc) · 4.42 KB
/
offline.html
File metadata and controls
176 lines (150 loc) · 4.42 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Offline - Renderer Portfolio</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', system-ui, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 2rem;
}
.offline-container {
text-align: center;
max-width: 600px;
}
.offline-icon {
font-size: 6rem;
margin-bottom: 2rem;
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-20px);
}
}
h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
font-weight: 700;
}
p {
font-size: 1.25rem;
line-height: 1.6;
margin-bottom: 2rem;
opacity: 0.9;
}
.btn {
display: inline-block;
padding: 1rem 2rem;
background: white;
color: #667eea;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
font-size: 1rem;
transition: transform 0.3s, box-shadow 0.3s;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.cached-pages {
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.cached-pages h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.page-links {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
margin-top: 1.5rem;
}
.page-link {
padding: 0.75rem 1.5rem;
background: rgba(255, 255, 255, 0.2);
color: white;
text-decoration: none;
border-radius: 6px;
transition: background 0.3s;
backdrop-filter: blur(10px);
}
.page-link:hover {
background: rgba(255, 255, 255, 0.3);
}
@media (max-width: 768px) {
.offline-icon {
font-size: 4rem;
}
h1 {
font-size: 2rem;
}
p {
font-size: 1.1rem;
}
.page-links {
flex-direction: column;
}
.page-link {
width: 100%;
}
}
</style>
</head>
<body>
<div class="offline-container">
<div class="offline-icon">📡</div>
<h1>You're Offline</h1>
<p>
No internet connection detected. Some features may be limited,
but you can still browse cached pages.
</p>
<button class="btn" onclick="location.reload()">Try Again</button>
<div class="cached-pages">
<h2>Available Offline Pages</h2>
<p style="font-size: 1rem; opacity: 0.8;">These pages are cached and available to view:</p>
<div class="page-links">
<a href="/" class="page-link">🏠 Home</a>
<a href="/projects.html" class="page-link">🚀 Projects</a>
<a href="/blog.html" class="page-link">📝 Blog</a>
<a href="/resume.html" class="page-link">📄 Resume</a>
<a href="/about.html" class="page-link">👤 About</a>
<a href="/contact.html" class="page-link">📧 Contact</a>
</div>
</div>
</div>
<script>
// Listen for online event
window.addEventListener('online', () => {
location.reload();
});
// Check connection status periodically
setInterval(() => {
if (navigator.onLine) {
location.reload();
}
}, 5000);
</script>
</body>
</html>