mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
fix: remove flash
This commit is contained in:
parent
f4ab60e894
commit
7e0931dd5e
@ -55,6 +55,10 @@ export function renderPage(idSelector, PageComponent) {
|
|||||||
appSidebar
|
appSidebar
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.body.classList.contains('js-loading')) {
|
||||||
|
document.body.classList.remove('js-loading');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function renderEmbedPage(idSelector, PageComponent) {
|
export function renderEmbedPage(idSelector, PageComponent) {
|
||||||
@ -63,4 +67,8 @@ export function renderEmbedPage(idSelector, PageComponent) {
|
|||||||
if (appContent && PageComponent) {
|
if (appContent && PageComponent) {
|
||||||
ReactDOM.render(<PageComponent />, appContent);
|
ReactDOM.render(<PageComponent />, appContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.body.classList.contains('js-loading')) {
|
||||||
|
document.body.classList.remove('js-loading');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -32,12 +32,17 @@
|
|||||||
</style>
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.js-loading .page-main-wrap {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body class="js-loading">
|
||||||
|
|
||||||
{% block beforecontent %}{% endblock %}
|
{% block beforecontent %}{% endblock %}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user