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
// Respond with a HTML page with silly gradients and crazy CSS
export default async function (req: Request): Promise<Response> {
const htmlContent = `
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
text-align: center;
font-family: 'Comic Sans MS', cursive, sans-serif;
color: white;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
h1 {
font-size: 4rem;
}
</style>
</head>
<body>
<h1>Welcome to the Silly World!</h1>
<p>Where even the CSS is a party!</p>
</body>
</html>
`;
return new Response(htmlContent, {
headers: { "Content-Type": "text/html" },
});
}