feat(examples): add saas tutorial skeleton
Add a compile-tested v1 tutorial skeleton that proves the production-shaped app boundary without provider-heavy scope: auth/session context, CSRF-checked mutation, local persistence adapter, generated form/slot/keyed row/page/push effects, plain CSS, SSE shape, and one explicit metrics island. req: examples/001 req: auth/001 req: auth/002 req: auth/004 req: form/001 req: failure/004 req: page_swap/002 req: push/003
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
(() => {
|
||||
function render(island) {
|
||||
const count = island.getAttribute("data-project-count") || "0";
|
||||
const readout = island.querySelector("[data-island-readout]");
|
||||
if (readout) readout.textContent = `${count} persisted project${count === "1" ? "" : "s"}`;
|
||||
}
|
||||
|
||||
function boot() {
|
||||
for (const island of document.querySelectorAll('[data-hemx-island="metrics"]')) render(island);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", boot);
|
||||
document.addEventListener("hemx:after-settle", boot);
|
||||
})();
|
||||
Reference in New Issue
Block a user