Skip to content

Commit

Permalink
chore: Add loading spinner to index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbastos committed Jul 14, 2024
1 parent c690ea6 commit 6161024
Showing 1 changed file with 90 additions and 1 deletion.
91 changes: 90 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,100 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<style>
html,
body {
margin: 0;
padding: 0;
}
#root {
user-select: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background: #171717;
}
/* spinner */
.lds-ellipsis {
/* change color here */
color: #fff;
}
.lds-ellipsis,
.lds-ellipsis div {
box-sizing: border-box;
}
.lds-ellipsis {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ellipsis div {
position: absolute;
top: 33.33333px;
width: 13.33333px;
height: 13.33333px;
border-radius: 50%;
background: currentColor;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
left: 8px;
animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
left: 8px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
left: 32px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
left: 56px;
animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
/* spinner */
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mario Kart 3.js</title>
</head>
<body>
<div id="root"></div>
<div id="root">
<div class="lds-ellipsis">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<!-- <p style="color: #fff">LOADING ENGINE...</p> -->
</div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

0 comments on commit 6161024

Please sign in to comment.