add loading animation

Create _loader.scss

Update main.scss

Update _base.scss

Update gui.js

Update index.html

removed trailing spaces

removed trailing white spaces for real
This commit is contained in:
H4ndl3 2017-03-13 22:54:36 +01:00 committed by Milan Pässler
parent b2c2627d73
commit 8f7c63bbce
5 changed files with 41 additions and 0 deletions

View file

@ -14,5 +14,15 @@
</script>
</head>
<body>
<div class="loader">
<p>
Lade<br />
<span class="spinner"></span><br />
Karte &amp; Knoten...
</p>
<noscript>
<strong>JavaScript required</strong>
</noscript>
</div>
</body>
</html>

View file

@ -48,6 +48,9 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
}
}
var loader = document.getElementsByClassName("loader")[0]
loader.classList.add("hide")
contentDiv = document.createElement("div")
contentDiv.classList.add("content")
document.body.appendChild(contentDiv)

View file

@ -28,3 +28,7 @@ h5 {
h6 {
font-size: 0.67em;
}
.hide {
display: none;
}

23
scss/_loader.scss Normal file
View file

@ -0,0 +1,23 @@
.loader {
color: #000000;
font-size: 1.8em;
line-height: 2;
margin: 30vh auto;
text-align: center;
}
.spinner {
animation: .6s spinner ease-in-out infinite alternate;
border-bottom: 2px solid #000000;
border-radius: 50%;
display: inline-block;
height: 64px;
margin-top: 10px;
width: 64px;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}

View file

@ -4,6 +4,7 @@
@import '_leaflet';
@import '_leaflet.label';
@import '_filters';
@import '_loader';
$minscreenwidth: 630pt;
$sidebarwidth: 420pt;