Nuxt/lib/app/views/loading/default.html

73 lines
1.4 KiB
HTML
Raw Normal View History

2018-03-25 18:35:13 +00:00
<style>
body, html, #__nuxt {
background-color: <%= options.background %>;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
flex-direction: column;
2018-03-25 18:35:13 +00:00
}
.loader,
.loader:after {
border-radius: 50%;
width: 5rem;
height: 5rem;
}
.loader {
margin: 60px auto;
font-size: 10px;
position: relative;
text-indent: -9999em;
border: .5rem solid <%= options.color2 %>;
border-left: .5rem solid <%= options.color %>;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s infinite linear;
}
.loader.error {
border-left: .5rem solid #ff4500;
animation-duration: 5s;
}
2018-03-25 18:35:13 +00:00
@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
</style>
<script>
window.addEventListener('error', function() {
var e = document.getElementById("loader");
if (e) e.className += " error";
});
</script>
2018-03-25 18:35:13 +00:00
<div class="loader"><%= options.loading %></div>
<%= options.dev ? '<!-- https://projects.lukehaas.me/css-loaders -->' : '' %>