This repository has been archived on 2021-01-15. You can view files and clone it, but cannot push or open issues or pull requests.
goBug/template/Interfaccia.html

154 lines
3.5 KiB
HTML
Raw Normal View History

2017-05-26 13:09:48 +00:00
<html>
<head>
2017-05-26 16:53:04 +00:00
<title>Go Bug</title>
2017-05-26 13:09:48 +00:00
<meta charset="UTF-8">
2017-05-26 16:53:04 +00:00
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
2017-05-26 21:05:01 +00:00
<!--<img src="/static/CellaVerde.png">
<img src="/static/cellaRossa.png">-->
2017-05-26 15:30:17 +00:00
<link href="https://fonts.googleapis.com/css?family=Hammersmith+One" rel="stylesheet">
2017-05-26 13:09:48 +00:00
<style type="text/css">
2017-05-26 15:30:17 +00:00
body {
font-family: 'Hammersmith One', sans-serif;
}
h1,h2,h3,h4 {
color: white;
text-align: center;
}
p {
2017-05-26 15:30:17 +00:00
color: white;
}
body {
2017-05-26 13:09:48 +00:00
background: #009999;
}
table {
2017-05-26 15:30:17 +00:00
table-layout: fixed;
2017-05-26 13:09:48 +00:00
empty-cells: show;
2017-05-26 17:23:16 +00:00
font-size: .55em;
2017-05-26 14:27:52 +00:00
}
div {
2017-05-26 15:30:17 +00:00
float: left;
}
.clearfix:after {
content: "";
display: table;
clear: both;
}
main {
background-color: #00bbbb;
2017-05-26 13:09:48 +00:00
}
2017-05-26 15:30:17 +00:00
td {
2017-05-26 13:09:48 +00:00
background: white;
2017-05-26 21:28:45 +00:00
font-size: 12px;
2017-05-26 15:30:17 +00:00
text-align: center;
vertical-align: middle;
width: calc((70vw / {{.larghezza}}) - 3px);
2017-05-26 21:05:01 +00:00
color: black;
font-weight: bold;
2017-05-26 17:07:52 +00:00
min-height: calc(((100vw - 4em) / {{.altezza}}) - 8px);
height: 3em;
2017-05-26 13:09:48 +00:00
}
2017-05-26 14:43:12 +00:00
.cibo {
2017-05-26 22:28:41 +00:00
background-image: url("/static/cibo.png");
background-size: 100% 100%;
2017-05-26 14:43:12 +00:00
padding: 0px;
2017-05-26 13:38:17 +00:00
}
2017-05-26 14:43:12 +00:00
.razza1 {
2017-05-26 21:05:01 +00:00
background-image: url("/static/cellaVerde.png");
background-size: 200% 400%;
2017-05-26 14:43:12 +00:00
padding: 0px;
}
2017-05-26 14:43:12 +00:00
.razza2 {
2017-05-26 21:28:45 +00:00
background-image: url("/static/prova1.png");
background-size: 180% 300%;
2017-05-26 14:43:12 +00:00
padding: 0px;
2017-05-26 13:38:17 +00:00
}
2017-05-26 15:30:17 +00:00
div.tabella {
2017-05-26 17:23:16 +00:00
font-family: sans-serif;
2017-05-26 15:30:17 +00:00
float:left;
display:block;
width: 70vw;
}
div.legenda {
margin-left: 1em;
float:left;
display:block;
width: calc(100% - 70vw - 1em);
}
@media screen and (max-width: 800px) {
div.tabella, div.legenda {
margin-left: 0;
width: 100%;
}
td {
width: calc((100vw / {{.larghezza}}) - 3px);
}
}
2017-05-26 15:54:45 +00:00
div.colorsample {
width: 1em;
height: 1em;
display: inline-block;
}
2017-05-26 22:57:04 +00:00
img{
height: 100%
}
img.batteri{
height: 100%
}
2017-05-26 13:09:48 +00:00
</style>
2017-05-26 15:54:45 +00:00
<script>
reload = function() {
var xhr = new XMLHttpRequest()
xhr.open('GET', '/tabella')
xhr.send(null)
xhr.onreadystatechange = function () {
var DONE = 4, OK = 200
if (xhr.readyState === DONE) {
if (xhr.status === OK)
document.getElementById("tb").innerHTML = xhr.responseText
else console.log('Error: ' + xhr.status)
}
}
}
window.setInterval(reload, 1000 * {{ .tempoAggiorna }})
reload()
</script>
2017-05-26 13:09:48 +00:00
</head>
<body>
2017-05-26 16:54:56 +00:00
<h1>Go Bug</h1>
2017-05-26 15:54:45 +00:00
<main class="clearfix">
<div id="tb" class="tabella"></div>
2017-05-26 15:30:17 +00:00
<div class="legenda">
<h1>legenda</h1>
2017-05-26 22:57:04 +00:00
<div class="colorsample"><img src="/static/cibo.png"></div>&nbsp;Cibo<br>
<div class="colorsample"><img class="batteri" src="/static/cellaVerde - Copia.png"></div>&nbsp;Razza 1<br>
<div class="colorsample"><img class="batteri" src="/static/prova1 - Copia.png"></div>&nbsp;Razza 2
</div>
2017-05-26 15:30:17 +00:00
</main>
2017-05-26 21:36:12 +00:00
<!--<div>
2017-05-27 02:34:31 +00:00
<form action=" " method="post">
2017-05-26 21:36:12 +00:00
</br>
Height: <input type="text" id="Height" value="10">
</br>
Width: <input type="text" id="Width" value="10">
</br>
Healt: <input type="text" id="Healt" value="50">
</br>
Max Age: <input type="text" id="Maxage" value="30">
</br>
Usage of energy during movement: <input type="text" id="UseEn" value="5">
</br>
Usage of energy during reproduction: <input type="text" id="UseRe" value="5">
</br></br>
2017-05-27 02:34:31 +00:00
<input type="submit" id="Start" name="start" value="start">
2017-05-26 21:36:12 +00:00
</br></br>
2017-05-27 02:34:31 +00:00
<input type="submit" id="Stop" name="stop" value="stop">
2017-05-26 21:36:12 +00:00
</form>
</div>-->
</body>
2017-05-26 13:09:48 +00:00
</html>