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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/** @jsxImportSource npm:hono@3/jsx */
import date_me_doc_locations from "https://esm.town/v/stevekrouse/date_me_doc_locations";
import Layout from "https://esm.town/v/stevekrouse/dateme_layout";
import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
import { Hono } from "npm:hono@3";
// export default function Home(c) {
function Home(c) {
return c.html(
<Layout activeTab={new URL(c.req.url).pathname}>
<div class="max-w-lg mx-auto p-10">
<div class="mb-10">
<div class="text-4xl font-bold mb-4">
Date thoughtfully 2
</div>
<div class="text-lg ">
Date Me Docs are long-form, earnest dating profiles for romantic partners.
</div>
</div>
<form class="space-y-4" action="/browse">
<div class="flex text-xl space-x-2">
<div>I'm</div>
<select name="gender" class="border border-gray-300">
<option value="" class="text-gray-500">...</option>
<option value="m">male</option>
<option value="f">female</option>
<option value="nb">non-binary</option>
</select>
</div>
<div class="flex text-xl space-x-2">
<div>Looking for</div>
<select name="desired-gender" class="border border-gray-300">
<option value="">...</option>
<option value="m">male</option>
<option value="f">female</option>
<option value="nb">non-binary</option>
</select>
</div>
<div class="flex text-xl space-x-2">
<div>Between</div>
<input defaultValue={18} type="number" name="min-age" class="w-12 h-min border border-gray-300"></input>
<div>and</div>
<input defaultValue={70} type="number" name="max-age" class="w-12 border border-gray-300"></input>
<div>years old</div>
</div>
<div class="flex text-xl space-x-2">
<div>In</div>
<select name="location" class="border border-gray-300">
<option value="">...</option>
{date_me_doc_locations.map(
(location) => <option key={location} value={location}>{location}</option>,
)}
</select>
</div>
<button class="border text-xl border-gray-300 px-4 py-2 bg-blue-500 text-white font-bold rounded">
Search
</button>
</form>
</div>
</Layout>,
);
}
const app = new Hono();
app.get("/", Home);
export default reloadOnSaveFetchMiddleware(app.fetch);