You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
496 B
TypeScript

import html from "../../html";
import { BaseContext } from "koa";
import { Readable } from "stream";
import { tempstream } from "tempstream";
import navbar from "./navbar";
import { NewTask, TaskList } from "../tasks/tasks.views";
export function MainView(ctx: BaseContext): Readable {
return html(
ctx,
tempstream/* HTML */ ` <title>My Own ToDo App</title>
<body>
${navbar(ctx)}
<h1>My ToDo App (with esbuild!)</h1>
${TaskList(ctx.$context)} ${NewTask()}
</body>`
);
}