46 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#10251d" />
<title>Squirrel Forest</title>
</head>
<body>
<div id="game"></div>
<script>
(() => {
const showBootError = (message) => {
if (document.getElementById('boot-error')) return;
const box = document.createElement('div');
box.id = 'boot-error';
box.style.cssText = [
'position:fixed',
'inset:0',
'z-index:9999',
'display:flex',
'align-items:center',
'justify-content:center',
'padding:24px',
'box-sizing:border-box',
'background:#10251d',
'color:#f4ead2',
'font:16px/1.45 system-ui,sans-serif',
'text-align:center'
].join(';');
box.textContent = 'Squirrel Forest could not start. ' + message;
document.body.appendChild(box);
};
window.addEventListener('error', (event) => {
showBootError(event.message || 'A browser error occurred.');
});
window.addEventListener('unhandledrejection', (event) => {
showBootError(String(event.reason || 'A startup promise failed.'));
});
})();
</script>
<script type="module" src="/src/main.js"></script>
</body>
</html>