all repos — h3 @ 4b9f458e76b5dc8ac68cb42f7e2f0e959807b2db

A tiny, extremely minimalist JavaScript microframework.

Added spinner.
Fabio Cevasco h3rald@h3rald.com
Fri, 17 Apr 2020 23:03:41 +0200
commit

4b9f458e76b5dc8ac68cb42f7e2f0e959807b2db

parent

36a3c9d81c7440bfcdff27177e5915f47be6038a

1 files changed, 3 insertions(+), 4 deletions(-)

jump to
M docs/js/app.jsdocs/js/app.js

@@ -34,6 +34,8 @@ h3.redraw();

})(); } const menu = ids.map((p) => h3("a", { href: `#/${p}` }, labels[p])); + const html = h3.state.pages[id]; + const content = html ? h3("div.content", { $html: html}) : h3("div.empty", {style: "text-align: center; margin: auto;"}, h3("span.spinner")); return h3("div.page", [ h3("header.row", [ h3("a.logo.col-sm", { href: "#/" }, "H3"),

@@ -46,10 +48,7 @@ h3("label.drawer-close", { for: "drawer-control" }),

...menu, ]), h3("main.col-sm-12.col-md-9", [ - h3( - "div.card.fluid", - h3("div.section", h3("div.content", { $html: h3.state.pages[id] })) - ), + h3("div.card.fluid", h3("div.section", content)) ]), h3("footer", h3("div", "© 2020 Fabio Cevasco")), ]),