2023-11-05 21:49:32 +01:00
|
|
|
|
import { el } from "deka-dom-el";
|
2023-09-26 16:02:10 +02:00
|
|
|
|
import { styles, common } from "./index.css.js";
|
|
|
|
|
import { example, css as example_css } from "./components/example.html.js";
|
|
|
|
|
export const css= styles()
|
|
|
|
|
.include(common)
|
|
|
|
|
.css`
|
|
|
|
|
.note{
|
|
|
|
|
font-size: .9rem;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
.include(example_css);
|
2023-11-06 20:20:32 +01:00
|
|
|
|
|
|
|
|
|
import { header } from "./layout/head.html.js";
|
2023-11-07 15:10:55 +01:00
|
|
|
|
/** @param {import("./types.d.ts").PageAttrs} attrs */
|
|
|
|
|
export function page({ pkg, info, path_target, pages, registerClientFile }){
|
|
|
|
|
const page_id= info.id;
|
2023-11-06 14:04:27 +01:00
|
|
|
|
return el().append(
|
2023-11-07 15:10:55 +01:00
|
|
|
|
el(header, { info, pkg, path_target, pages }),
|
|
|
|
|
el("main").append(
|
|
|
|
|
el("p", "The library tries to provide pure JavaScript tool(s) to create reactive interfaces. "),
|
|
|
|
|
el("p", "The main goals are:"),
|
|
|
|
|
el("ul").append(
|
|
|
|
|
el("li", "provide a small wrappers/utilities around the native JavaScript DOM"),
|
|
|
|
|
el("li", "keep library size around 10kB at maximum (if possible)"),
|
|
|
|
|
el("li", "zero dependencies (if possible)"),
|
|
|
|
|
el("li", "prefer a declarative/functional approach"),
|
|
|
|
|
el("li", "unopinionated (allow alternative methods)"),
|
2023-11-06 13:45:43 +01:00
|
|
|
|
),
|
2023-11-07 15:10:55 +01:00
|
|
|
|
el("p", { className: "note" }).append(
|
|
|
|
|
"It is, in fact, an reimplementation of ",
|
|
|
|
|
el("a", {
|
|
|
|
|
href: "https://github.com/jaandrle/dollar_dom_component",
|
|
|
|
|
title: "GitHub repository of library. Motto: Functional DOM components without JSX and virtual DOM.",
|
|
|
|
|
textContent: "jaandrle/dollar_dom_component"
|
|
|
|
|
}),
|
|
|
|
|
".",
|
2023-11-06 13:45:43 +01:00
|
|
|
|
),
|
2023-11-07 15:10:55 +01:00
|
|
|
|
el(example, { src: new URL("./components/examples/helloWorld.js", import.meta.url), page_id, registerClientFile }),
|
|
|
|
|
)
|
2023-09-26 16:02:10 +02:00
|
|
|
|
);
|
|
|
|
|
}
|