-
Notifications
You must be signed in to change notification settings - Fork 4
/
offline.html
55 lines (50 loc) · 1.53 KB
/
offline.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
<html>
<head>
<meta charset="UTF-8">
<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>
<title>SWViewer | Offline</title>
<meta name="theme-color" content="#212121">
<style>
body {
margin: 0;
padding: 16px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-family: sans-serif;
}
h1 {
margin: 0;
padding: 0;
}
button {
width: 200px;
height: 44px;
margin-top: 2em;
font-weight: bold;
font-size: 18px;
border: none;
border-radius: 4px;
background-color: #0063E4;
color: white;
cursor: pointer;
}
</style>
</head>
<body cz-shortcut-listen="true">
<h1>SWViewer requires an active internet connection to function.</h1>
<button onclick="reload()">Reload</button>
<script>
function reload() {
if (navigator.onLine) {
console.log("reloading");
location.reload();
}
else {
window.alert("You are still offline!");
}
}
</script>
</body>
</html>