ui: prevent FOUC by hiding workspace and fading in after JS init
This commit is contained in:
@@ -527,3 +527,6 @@ document.querySelectorAll(".lang-btn").forEach((btn) => {
|
||||
window.renderAuth = renderAuth;
|
||||
window.setLanguage = setLanguage;
|
||||
renderAuth();
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.add("is-ready");
|
||||
});
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Tutor Platform</title>
|
||||
<link rel="stylesheet" href="/assets/styles.css" />
|
||||
<style>
|
||||
html { opacity: 0; transition: opacity 0.15s ease; }
|
||||
html.is-ready { opacity: 1; }
|
||||
#workspace-view { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user