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;
|
|
|
|
}
|
2017-05-26 14:31:04 +00:00
|
|
|
h1,h2,h3,h4 {
|
|
|
|
color: white;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
p {
|
2017-05-26 15:30:17 +00:00
|
|
|
color: white;
|
2017-05-26 14:31:04 +00:00
|
|
|
}
|
|
|
|
body {
|
2017-05-26 13:09:48 +00:00
|
|
|
background: #009999;
|
|
|
|
}
|
2017-05-26 14:31:04 +00:00
|
|
|
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
|
|
|
}
|
2017-05-26 14:31:04 +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:31:04 +00:00
|
|
|
}
|
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>
|
2017-05-26 14:31:04 +00:00
|
|
|
<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>
|
2017-05-26 14:31:04 +00:00
|
|
|
{{ 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">
|
2017-05-26 14:31:04 +00:00
|
|
|
<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>
|
2017-05-26 14:31:04 +00:00
|
|
|
<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>
|
2017-05-26 14:31:04 +00:00
|
|
|
<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>
|
2017-05-26 14:31:04 +00:00
|
|
|
</div>
|
2017-05-26 15:30:17 +00:00
|
|
|
</main>
|
2017-05-26 14:31:04 +00:00
|
|
|
</body>
|
2017-05-26 13:09:48 +00:00
|
|
|
</html>
|