4const tabs = { "/": "Home", "/browse": "Browse", "/faq": "FAQ" };
5
6export default function({ activeTab, children }: PropsWithChildren<{ activeTab: string }>) {
7 return (
8 <html>
4import Layout from "https://esm.town/v/stevekrouse/dateme_layout";
5
6export default function Home(c) {
7 return c.html(
8 <Layout activeTab={new URL(c.req.url).pathname}>
2import { reloadOnSaveMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
3
4export default reloadOnSaveMiddleware(async function(req: Request): Promise<Response> {
5 return html(`<h1>Hello 3!!</h1>`);
6});
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
4
5export const reloadOnVals = async function(vals: { userHandle: string; valName: string }[]) {
6 const valVersions = await Promise.all(vals.map(getCurrentValVersionNumber));
7 // console.log("initialValVersions: ", valVersions);
4 * @param {string} valSlug - ie "username/valname"
5 */
6export async function getCurrentValVersionNumber({ name, handle }) {
7 const { version } = await alias({ username: handle, valName: name });
8 return version;
9import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
10
11export default reloadOnSaveFetchMiddleware(async function(req: Request): Promise<Response> {
12 return html(`<h1>Hello!!</h1>`);
13})
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
14 results: OctopusPrice[];
15};
16export async function octopusAgilePricing(location: string): Promise<OctopusPrice> {
17 const locationMap = {
18 "London": "C",
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function postHogAPICapture({ key, event, properties, distinct_id }: {
4 key: string;
5 event: string;
1export default async function handler(request: Request) {
2 if (request.method === "GET") {
3 return new Response(
9 <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.3/dist/tailwind.min.css" rel="stylesheet">
10 <script>
11 function handleSubmit(event) {
12 event.preventDefault();
13 var dreamInput = document.getElementById('dreamInput');
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",