mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-02 20:15:53 +02:00
* :tap: removed on.attributeChanged and static observedAttributes * ⚡ import optimalization * ⚡ scope.signal * 🔤 🐛 * ⚡ 🐛 registerReactivity and types * 🔤 * ⚡ * 🔤 * 🐛 Node in enviroment * ⚡ todos * ⚡ * ⚡ 🔤 * ⚡ lint * ⚡ memo * 🔤 🐛 memo * ⚡ 🔤 todomvc * 🐛 types * 🔤 p08 signal factory * 🔤 ⚡ types * ⚡ 🔤 lint * 🔤 * 🔤 * 🔤 * 🔤 * 📺
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
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 { ireland } from "../components/ireland.html.js";
|
|
import "../components/scrollTop.css.js";
|
|
/** @param {string} url */
|
|
const fileURL= url=> new URL(url, import.meta.url);
|
|
|
|
/** @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(ireland, { src: fileURL("../components/scrollTop.js.js"), exportName: "scrollTop" })
|
|
));
|
|
}
|