Files
TIC-80/index.html

48 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f4f4f4"/>
<link rel="manifest" href="tic80.webmanifest">
<link rel="apple-touch-icon" sizes="180x180" href="tic80-180.png">
<link rel="apple-touch-icon" sizes="192x192" href="tic80-192.png">
<link rel="apple-touch-icon" sizes="512x512" href="tic80-512.png">
<title>TIC-80</title>
<style type="text/css">
#game-frame > div { font-size: 44px; font-family: monospace; font-weight: bold;}
.game { width: 100vw; height: 100vh; }
</style>
</head>
<body style="margin:0; padding:0;">
<div class="game" style="margin: 0; position: relative; background: #1a1c2c;">
<div id="game-frame" style="position: absolute; margin: 0 auto; opacity: 1; background: #1a1c2c; width: 100%; height: 100%;">
<div style="display: flex; justify-content: center; align-items: center; width: 100%; height: 100%;">
<img src="tic80-512.png"></img>
</div>
</div>
<canvas style="width: 100%; height: 100%; margin: 0 auto; display: block; image-rendering: pixelated;" id="canvas" oncontextmenu="event.preventDefault()" onmousedown="window.focus()"></canvas>
</div>
<script type="text/javascript">
var Module = {
canvas: document.getElementById('canvas')
}
navigator.serviceWorker.register('serviceworker.js');
setTimeout(function() {
const scriptTag = document.createElement('script');
scriptTag.src = 'tic80.js';
document.body.appendChild(scriptTag);
document.getElementById('game-frame').remove()
}, 2000);
</script>
</body>
</html>