- manifest.webmanifest (full screen, any orientation), icons 192/512/maskable/apple-touch - sw.js: network first, cache as offline fallback, the savegame API is never cached - registered only over HTTPS or on localhost; nginx serves the manifest type - README: installing, HTTPS requirement Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.4 KiB
HTML
34 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>DungeonCraft</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="theme-color" content="#080608">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="manifest" href="manifest.webmanifest">
|
|
<link rel="icon" type="image/png" href="icons/icon-192.png">
|
|
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png">
|
|
<style>
|
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #080608; }
|
|
canvas { display: block; width: 100%; height: 100%; outline: none; image-rendering: pixelated; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="glcanvas" tabindex="1" oncontextmenu="return false"></canvas>
|
|
<script>var register_plugin; /* expected by the quad_net plugin in the bundle */</script>
|
|
<script src="mq_js_bundle.js"></script>
|
|
<script src="dc_plugin.js"></script>
|
|
<script>
|
|
document.getElementById("glcanvas").focus();
|
|
load("dungeoncraft.wasm");
|
|
// installable app (PWA): only over HTTPS or on localhost
|
|
if ("serviceWorker" in navigator && (location.protocol === "https:" || location.hostname === "localhost")) {
|
|
navigator.serviceWorker.register("sw.js").catch(function () {});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|