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 %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div class="hidden">
|
||||||
<tesoft-nav>
|
<tesoft-nav>
|
||||||
{% for item in [{title: "Home", href: "/"}, {title: "Blog", href: "/blog"}, {title: "About me", href: "/about"}] %}
|
{% 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 %}>
|
<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);
|
await Promise.all(promises);
|
||||||
|
document.querySelector("body > div")!.classList.remove("hidden");
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user