import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
return new Response(
renderToString(
<html>
<head>
<meta charSet="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jane Doe</title>
<style>{`
body {
background-color: #f0f4f8;
color: #2d3748;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 40px 20px;
text-align: center;
}
h1 {
color: #4a5568;
font-size: 2.5rem;
margin-bottom: 10px;
}
p {
font-size: 1.1rem;
margin-bottom: 30px;
}
.links {
display: flex;
flex-direction: column;
gap: 15px;
}
.source-link {
margin-top: 30px;
font-size: 0.9rem;
color: #718096;
}
.source-link a {
color: #4299e1;
text-decoration: none;
}
.source-link a:hover {
text-decoration: underline;
}
`}</style>
</head>
<body>
<div className="container">
<h1>Jane Doe</h1>
<p>Web developer and coffee enthusiast</p>
<div className="links">
<a href="https://www.instagram.com/janedoe" style={itemStyle}>Instagram</a>
<a href="https://github.com/janedoe" style={itemStyle}>Github</a>
<a href="https://www.linkedin.com/in/janedoe" style={itemStyle}>LinkedIn</a>
<a href="https://twitter.com/janedoe" style={itemStyle}>Twitter</a>
<a href="https://www.youtube.com/janedoe" style={itemStyle}>YouTube</a>
</div>
<div className="source-link">
<a href={import.meta.url.replace("esm.town", "val.town")}>View Source</a>
</div>
</div>
</body>
</html>
),
{
headers: {
"Content-Type": "text/html",
},
},
);
}
const itemStyle = {
padding: "12px 20px",
color: "white",
backgroundColor: "#4299e1",
borderRadius: "30px",
textDecoration: "none",
fontWeight: "bold",
transition: "all 0.3s ease",
boxShadow: "0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08)",
};