-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (47 loc) · 2.04 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <meta name="viewport" content="width=1280, initial-scale=0.5, maximum-scale=1, user-scalable=no"> -->
<title>Parrot's Feast</title>
<!-- Favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Altre icone per diversi formati e dispositivi -->
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#2196f3">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="install-overlay" style="display: none;">
<div id="install-card">
<p>The game can be installed locally as an App or played online in the Browser.</p>
<div id="install-buttons">
<button id="install-button">INSTALL APP</button>
<button id="online-button">PLAY ONLINE</button>
</div>
</div>
</div>
<div id="game-container">
<canvas id="backgroundCanvas"></canvas>
<canvas id="parrotCanvas"></canvas>
<canvas id="interfaceCanvas"></canvas>
</div>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('service-worker.js', { updateViaCache: 'none' }).then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
<script src="script.js"></script>
</body>
</html>