index page loading gif added

This commit is contained in:
MohammadTaha Basiri 2022-01-29 13:56:30 +03:30
parent 1a04e7aaa7
commit edd1f23079
1 changed files with 24 additions and 1 deletions

View File

@ -31,8 +31,23 @@
<title>Didvan</title> <title>Didvan</title>
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<style>
.container {
width: 100vw;
height: 100vh;
display: flex; /* Default Axis is X*/
justify-content: center; /* Main Axis */
align-items: center; /* Cross Axis */
}
.indicator{
width: 50vw;
}
</style>
</head> </head>
<body> <body style="overflow: hidden">
<div id="loading_indicator" class="container">
<img class="indicator" src="./assets/animations/loading.gif" />
</div>
<!-- This script installs service_worker.js to provide PWA functionality to <!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see: application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers --> https://developers.google.com/web/fundamentals/primers/service-workers -->
@ -99,6 +114,14 @@
// Service workers not supported. Just drop the <script> tag. // Service workers not supported. Just drop the <script> tag.
loadMainDartJs(); loadMainDartJs();
} }
window.onload = function () {
setTimeout(function () {
var loadingIndicator = document.getElementById("loading_indicator");
if (loadingIndicator) {
loadingIndicator.remove();
}
}, 10000);
};
</script> </script>
</body> </body>
</html> </html>