mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-17 06:14:27 +01:00
feat: added App loading splash screen
This commit is contained in:
BIN
public/assets/images/logo.png
Normal file
BIN
public/assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -10,6 +10,7 @@
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<link rel="stylesheet" href="%PUBLIC_URL%/styles.css" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
@@ -44,6 +45,9 @@
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<div class="loading-app">
|
||||
<img src="%PUBLIC_URL%/assets/images/logo.png" alt="Bolt Fun" />
|
||||
</div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
36
public/styles.css
Normal file
36
public/styles.css
Normal file
@@ -0,0 +1,36 @@
|
||||
.loading-app {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.loading-app.removed {
|
||||
transition: opacity 0.8s ease-out;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.loading-app img {
|
||||
width: min(80%, 250px);
|
||||
animation: fadeInOut 3s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes fadeInOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
/* transform: rotate(0deg); */
|
||||
}
|
||||
|
||||
80% {
|
||||
opacity: 1;
|
||||
/* transform: rotate(0deg); */
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
/* transform: rotate(360deg); */
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,13 @@ function App() {
|
||||
setTimeout(() => {
|
||||
Wallet_Service.init();
|
||||
}, 2000)
|
||||
|
||||
const loadingAppPanel = document.querySelector('.loading-app');
|
||||
loadingAppPanel?.classList.add('removed');
|
||||
setTimeout(() => {
|
||||
loadingAppPanel?.remove()
|
||||
}, 800)
|
||||
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user