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

114 lines
2.5 KiB
HTML
Raw Normal View History

2017-05-26 13:09:48 +00:00
<html>
<head>
<title>GoBug</title>
2017-05-26 14:43:12 +00:00
<!--meta http-equiv="refresh" content="{{ .tempoAggiorna }}"-->
2017-05-26 13:09:48 +00:00
<meta charset="UTF-8">
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 15:30:17 +00:00
font-size: .6em;
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
tr, td {
}
td {
2017-05-26 13:09:48 +00:00
background: white;
2017-05-26 15:30:17 +00:00
text-align: center;
vertical-align: middle;
width: calc((70vw / {{.larghezza}}) - 3px);
height: calc(((100vh - 8em) / {{.altezza}}) - 8px);
2017-05-26 13:09:48 +00:00
}
2017-05-26 14:43:12 +00:00
.cibo {
2017-05-26 13:38:17 +00:00
background: #FFFF33;
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 13:38:17 +00:00
background: #00ff00;
2017-05-26 14:43:12 +00:00
padding: 0px;
}
2017-05-26 14:43:12 +00:00
.razza2 {
2017-05-26 13:38:17 +00:00
background: #FF0000;
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 {
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 13:09:48 +00:00
</style>
</head>
<body>
<h1>Go bug</h1>
2017-05-26 15:30:17 +00:00
<main class="clearfix">
<div class="tabella">
<table>
{{range $riga := .matrice}}
<tr>
{{range $cella := $riga}}
<td {{ if not $cella }}
2017-05-26 15:33:26 +00:00
class="vuoto"> </td>
{{ else }}
2017-05-26 15:30:17 +00:00
{{ if $cella.IsFood }}
class="cibo"
{{ else }}
class="razza1"
2017-05-26 15:33:26 +00:00
{{ end }}>{{ $cella.Health }}</td>
{{ end }}
2017-05-26 15:30:17 +00:00
{{ end }}
</tr>
2017-05-26 14:28:38 +00:00
{{ end }}
2017-05-26 15:30:17 +00:00
</table>
</div>
<div class="legenda">
<h1>legenda</h1>
2017-05-26 15:30:17 +00:00
<div style="float:left; display:block; width:30%; height:19%; background-color:#FFFF33;"></div>
<div style="float:right; display:block; width:65%; height:20%; ">Cibo</div>
<div style="float:left; display:block; width:30%; height:20%; background-color:#00ff00;"></div>
2017-05-26 15:30:17 +00:00
<div style="float:right; display:block; width:65%; height:20%; ">Razza1</div>
<div style="float:left; display:block; width:30%; height:20%; background-color:#F00;"></div>
2017-05-26 15:30:17 +00:00
<div style="float:right; display:block; width:65%; height:19%; ">Razza2</div>
</div>
2017-05-26 15:30:17 +00:00
</main>
</body>
2017-05-26 13:09:48 +00:00
</html>