Public
Back

Version 116

3/23/2024
/** @jsxImportSource https://esm.sh/react */
import { Hono } from "npm:hono@3";

import { getAllPageEntriesDb, getLatestPageEntryDb } from "https://esm.town/v/rwev/pageEntriesDb";
import { renderToString } from "npm:react-dom/server";

const app = new Hono();

const stylesheet = (
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
);

app.get("/entry", async () => {
return new Response(
renderToString(
<>
{stylesheet}
<main class="container-fluid">
<form action="https://rwev-handleSavePageForm.web.val.run/" method="post">
<textarea id="text" placeholder="New entry" name="text"></textarea>
<input type="submit" value="Submit" />
</form>
</main>
</>,
),
{
headers: {
"Content-Type": "text/html",
},
},
);
});

rwev-page.web.val.run
Updated: March 23, 2024