-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoffline.html
46 lines (44 loc) · 1.04 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
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="Homotix.png" type="image/png">
<link rel="manifest" href="/manifest.json">
<title>Homotix</title>
<style>
body, html {
height: 100%;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
.gif-container {
display: flex;
justify-content: center;
align-items: center;
}
.gif {
max-width: 100%;
max-height: 100%;
}
</style>
</head>
<body>
<div class="gif-container">
<img src="/Mobile/Homotix.gif" class="gif" alt="Homotix">
</div>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/serviceworker.js')
.then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
})
.catch(error => {
console.error('Service Worker registration failed:', error);
});
});
}
</script>
</body>
</html>