rauchg-web.web.val.run
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
/** @jsxImportSource npm:react **/
import { renderToString } from "npm:react-dom@18/server";
export default (req: Request) => {
return new Response(
renderToString(
<html>
<head>
<title>Guillermo Rauch's val</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000" />
<style>
{`* { background: #000; color: #fff; margin: 0; padding: 0 }
main { width: 100dvw; height: 100dvh; display: flex; justify-content: center; align-items: center; }`}
</style>
</head>
<main>
<a href="https://vercel.com" target="_blank">
<svg
width="76"
height="65"
viewBox="0 0 76 65"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M37.5274 0L75.0548 65H0L37.5274 0Z"
fill="#fff"
/>
</svg>
</a>
</main>
</html>,
),
{ headers: { "Content-Type": "text/html" } },
);
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
1
jacob avatar

very good

v10
May 19, 2024