Initial Commit

This commit is contained in:
plane000
2018-07-17 14:57:52 +01:00
parent 2a9f73c5d5
commit 0d8f6c961a
216 changed files with 32763 additions and 0 deletions

16
client/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Printer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
</head>
<body>
<input class="input" id="name" type="text" placeholder="Your name">
<input class="input" id="coords" type="text" placeholder="Your coordinates (lat,long)">
<input class="update" id="update" type="submit" value="Submit" onclick="print();">
<script src="main.js"></script>
</body>
</html>

18
client/main.js Normal file
View File

@@ -0,0 +1,18 @@
async function print() {
let name = document.getElementById('name').value;
let coords = document.getElementById('coords').value;
if (name == '' || coords == '') {
alert('One of the fields is empty');
return;
}
let http = new XMLHttpRequest();
let string = '/print?name=' + name + '&coords=' + coords;
await http.open('GET', string, true);
await http.send();
document.getElementById('coords').value = '';
document.getElementById('name').value = '';
}

15
client/style.css Normal file
View File

@@ -0,0 +1,15 @@
input {
}
.input {
}
.update {
}
.update:hover {
}