recipes/web/comp/layout.ts

20 lines
542 B
TypeScript
Raw Normal View History

2022-05-24 11:26:13 +03:00
import { AnyNode, E } from "ren/node.ts";
2022-05-28 23:28:07 +03:00
import { Context } from "../context.ts";
2022-05-22 15:13:30 +03:00
2022-05-28 23:28:07 +03:00
export function Layout(ctx: Context, page: AnyNode): AnyNode {
return E("html", { lang: ctx.lang }, [
2022-05-22 15:13:30 +03:00
E("head", [], [
E("meta", { charset: "utf-8" }),
E("meta", {
name: "viewport",
content: "width=device-width, initial-scale=1",
}),
2022-05-24 23:23:08 +03:00
E("link", { rel: "stylesheet", href: "/static/styles.css" }),
2022-05-22 15:13:30 +03:00
E("title", [], "Recipes"),
]),
E("body", [], [
E("div", { id: "root" }, [page]),
]),
]);
}