Skip to content
Snippets Groups Projects
Commit 3cb33c36 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

UI: add a splashscreen

parent a492020c
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Duniter</title>
<style>
html {
font-family: "Courier New", Courier, monospace;
}
img {
width: 50%;
margin-left: auto;
margin-right: auto;
display: block;
margin-top: 40vh;
transform: translateY(-50%);
}
h1 {
text-align: center;
width: 80%;
margin-top: -10%;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<img src="duniter.png"/>
<h1 id="loader">Loading...</h1>
<script type="text/javascript">
function reqListener () {
document.getElementById('loader').innerHTML = 'Server ready.';
location.href = 'http://127.0.0.1:9220';
}
function test() {
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "http://127.0.0.1:9220/");
oReq.send();
}
function strange () {
document.getElementById('loader').innerHTML = 'The server is not starting...';
}
setInterval(test, 800);
setTimeout(strange, 8000);
</script>
</body>
</html>
\ No newline at end of file
{ {
"name": "Duniter", "name": "Duniter",
"main": "http://localhost:9220", "main": "index.html",
"node-main": "../sources/bin/ucoind", "node-main": "../sources/bin/ucoind",
"window": { "window": {
"icon": "duniter.png", "icon": "duniter.png",
"title": "Duniter v0.2" "title": "Duniter",
"width": 800,
"height": 800,
"min_width": 750,
"min_height": 400
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment