feat: add a loader for SPA javascript loading
This commit is contained in:
parent
62decb3314
commit
bc33bd48e8
43
frontend/app/spa-loading-template.html
Normal file
43
frontend/app/spa-loading-template.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!--
|
||||
This component is used to show a loading spinner when the SPA is loading.
|
||||
Source: https://github.com/barelyhuman/snips/blob/dev/pages/css-loader.md
|
||||
-->
|
||||
<div class="loader"></div>
|
||||
<style>
|
||||
.loader {
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 1031;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
box-sizing: border-box;
|
||||
border: solid 2px transparent;
|
||||
border-top-color: #000;
|
||||
border-left-color: #000;
|
||||
border-bottom-color: #efefef;
|
||||
border-right-color: #efefef;
|
||||
border-radius: 50%;
|
||||
-webkit-animation: loader 400ms linear infinite;
|
||||
animation: loader 400ms linear infinite;
|
||||
}
|
||||
|
||||
\@-webkit-keyframes loader {
|
||||
0% {
|
||||
-webkit-transform: translate(-50%, -50%) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: translate(-50%, -50%) rotate(360deg);
|
||||
}
|
||||
}
|
||||
\@keyframes loader {
|
||||
0% {
|
||||
transform: translate(-50%, -50%) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-50%, -50%) rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user