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
48
49
50
51
52
53
/** @jsxImportSource npm:hono@3/jsx */
import { Hono } from "npm:hono";
const app = new Hono();
const createMainPage = () => (
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
{`
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
#app {
width: 100%;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
iframe {
border: none;
width: 80%;
height: 80%;
}
`}
</style>
</head>
<body>
<div id="app">
<iframe width="100%" height="400px" src="https://www.val.town/embed/iamseeley/valception" title="Val Town" frameborder="0" allow="web-share" allowfullscreen></iframe>
</div>
</body>
</html>
);
app.get("/", (c) => {
return c.html(createMainPage());
});
export default app.fetch;