hide body during startup to reduce flicker

This commit is contained in:
zadam
2020-05-21 09:42:25 +02:00
parent 32dde426fd
commit 08dbf90a8c
3 changed files with 15 additions and 6 deletions

View File

@@ -8,6 +8,11 @@
<body class="desktop theme-<%= theme %>" style="--main-font-size: <%= mainFontSize %>%; --tree-font-size: <%= treeFontSize %>%; --detail-font-size: <%= detailFontSize %>%;">
<noscript>Trilium requires JavaScript to be enabled.</noscript>
<script>
// hide body to reduce flickering on the startup. This is done through JS and not CSS to not hide <noscript>
document.getElementsByTagName("body")[0].style.display = "none";
</script>
<div id="toast-container" class="d-flex flex-column justify-content-center align-items-center"></div>
<div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div>
@@ -78,6 +83,10 @@
<link href="stylesheets/style.css" rel="stylesheet">
<link href="stylesheets/detail.css" rel="stylesheet">
<script>
$("body").show();
</script>
<script src="app/desktop.js" crossorigin type="module"></script>
<link rel="stylesheet" type="text/css" href="libraries/boxicons/css/boxicons.min.css">