hide content until components are loaded
Signed-off-by: Tobias Erbshäußer <tobias@tesoft.dev>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div class="hidden">
|
||||
<tesoft-nav>
|
||||
{% for item in [{title: "Home", href: "/"}, {title: "Blog", href: "/blog"}, {title: "About me", href: "/about"}] %}
|
||||
<tesoft-button transparent href="{{ item.href }}" {% if item.title == title %}selected{% endif %}>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import {onReady} from "./main.ts";
|
||||
|
||||
onReady(() => {
|
||||
});
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import {onReady} from "./main.ts";
|
||||
|
||||
onReady(() => {
|
||||
});
|
||||
|
||||
@@ -73,6 +73,7 @@ export function onReady(callback: () => void, ...components: TesoftComponent[])
|
||||
}
|
||||
|
||||
await Promise.all(promises);
|
||||
document.querySelector("body > div")!.classList.remove("hidden");
|
||||
callback();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user