This commit is contained in:
Claudio Maggioni 2017-05-26 16:31:04 +02:00
commit fc54510ea6

View File

@ -4,44 +4,60 @@
<meta http-equiv="refresh" content="{{ .tempoAggiorna }}"> <meta http-equiv="refresh" content="{{ .tempoAggiorna }}">
<meta charset="UTF-8"> <meta charset="UTF-8">
<style type="text/css"> <style type="text/css">
h1,h2,h3,h4,p { h1,h2,h3,h4 {
color: white; color: white;
text-align: center; text-align: center;
font-size:2.4em; font-size:2.4em;
} }
body{
p {
color: white;
font-size:2em;
}
body {
background: #009999; background: #009999;
} }
table{
table {
border: 1px solid white; border: 1px solid white;
empty-cells: show; empty-cells: show;
background: white; background: white;
padding: 0px; padding: 0px;
width:100%; width:100%;
height: 89%; height: 100%;
} }
td,tr{
div {
width:20%;
height: 89%;
background-color:#006666;
}
td,tr {
background: white; background: white;
padding: 0px padding: 0px
} }
td.cibo{
td.cibo {
background: #FFFF33; background: #FFFF33;
padding: 0px padding: 0px
} }
td.razza1{
td.razza1 {
background: #00ff00; background: #00ff00;
padding: 0px padding: 0px
}td.razza2{
background: #FF0000;
padding: 0px
} }
td.razza2 {
background: #FF0000;
padding: 0px
}
</style> </style>
</head> </head>
<body> <body>
<h1>Go bug</h1> <h1>Go bug</h1>
<table> <div style="float:left; display:block; width:70%; height:89%; ">
{{range $riga := .matrice}} {{range $riga := .matrice}}
<tr> <tr>
{{range $cella := $riga}} {{range $cella := $riga}}
@ -49,9 +65,9 @@
class="vuoto" class="vuoto"
{{ else }} {{ else }}
{{ if $cella.IsFood }} {{ if $cella.IsFood }}
class="razza1" class="cibo"
{{ else }} {{ else }}
class="razza2" class="razza1"
{{ end }} {{ end }}
{{ end }} {{ end }}
>{{ $cella }}</td> >{{ $cella }}</td>
@ -59,5 +75,19 @@
</tr> </tr>
{{ end }} {{ end }}
</table> </table>
</body> </div>
<div style="float:left; display:block; width:1%; height:89%; "></div>
<div style="float:left; display:block; width:29%; height:89%; ">
<h1>legenda</h1>
<div style="float:left; display:block; width:30%; height:20%; background-color:#FFFF33;"></div>
<div style="float:right; display:block; width:65%; height:20%; "><p>Food</p></div>
<div style="float:right; display:block; width:100%; height:2%; "></div>
<div style="float:left; display:block; width:30%; height:20%; background-color:#00ff00;"></div>
<div style="float:right; display:block; width:65%; height:20%; "><p>Razza1</p></div>
<div style="float:right; display:block; width:100%; height:2%;"></div>
<div style="float:left; display:block; width:30%; height:20%; background-color:#F00;"></div>
<div style="float:right; display:block; width:65%; height:20%; "><p>Razza2</p></div>
</div>
</div>
</body>
</html> </html>