export default async function(req: Request): Promise<Response> {
const html = `
<html>
<head>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #282c34;
color: white;
font-family: Arial, sans-serif;
font-size: 2em;
text-align: center;
overflow: hidden;
}
h1 {
color: #61dafb;
animation: colorChange 3s infinite;
z-index: 1;
}
@keyframes colorChange {
0% { color: #61dafb; }
50% { color: #ff6f61; }
100% { color: #61dafb; }
}
.cat {
position: absolute;
animation: moveCat 10s infinite linear;
height: 100px;
}
@keyframes moveCat {
0% { transform: translate(0, 0); }
25% { transform: translate(80vw, 0); }
50% { transform: translate(80vw, 80vh); }
75% { transform: translate(0, 80vh); }
100% { transform: translate(0, 0); }
}
</style>
</head>
<body>
<h1>Hello, world!</h1>
<img src="https://i.imgur.com/JX4AR1D.png" class="cat" />
</body>
</html>
`;
return new Response(html, { headers: { "Content-Type": "text/html" } });
}