mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-02 20:15:53 +02:00
* 🔤 ⚡ T now uses DocumentFragment * 🔤 * 🔤 ⚡ * 🐛 lint * ⚡ cleanup * ⚡ 🔤 lib download * ⚡ 🔤 ui * ⚡ reorganize files * ⚡ on.host * 🐛 on.* types * ⚡ 🔤 cdn * 🔤 converter * 🐛 signal.set(value, force) * ⚡ 🔤 * 🔤 ⚡ converter - convert also comments * ⚡ bs/build * 🔤 ui p14 * 🔤 * 🔤 Examples * 🔤 * 🐛 now only el(..., string|number) * 🐛 fixes #38 * 🔤 * ⚡ on.host → on.defer * 🔤 * 📺
36 lines
917 B
JavaScript
36 lines
917 B
JavaScript
import "../global.css.js";
|
|
import { el, simulateSlots } from "deka-dom-el";
|
|
|
|
import { header } from "./head.html.js";
|
|
import { prevNext } from "../components/pageUtils.html.js";
|
|
import { scrollTop } from "../components/scrollTop.html.js";
|
|
|
|
/** @param {Pick<import("../types.d.ts").PageAttrs, "pkg" | "info">} attrs */
|
|
export function simplePage({ pkg, info }){
|
|
return simulateSlots(el().append(
|
|
// Skip link for keyboard navigation
|
|
el("a", {
|
|
href: "#main-content",
|
|
className: "skip-link",
|
|
textContent: "Skip to main content"
|
|
}),
|
|
|
|
// Header with site information
|
|
el(header, { info, pkg }),
|
|
|
|
// Main content area
|
|
el("main", { id: "main-content", role: "main" }).append(
|
|
el("h2", { textContent: info.fullTitle || info.title }),
|
|
|
|
// Main content from child elements
|
|
el("slot"),
|
|
|
|
// Navigation between pages
|
|
el(prevNext, info)
|
|
),
|
|
|
|
// Scroll to top button
|
|
el(scrollTop),
|
|
));
|
|
}
|