113 lines
2.5 KiB
HTML
113 lines
2.5 KiB
HTML
<html>
|
|
<head>
|
|
<title>GoBug</title>
|
|
<!--meta http-equiv="refresh" content="{{ .tempoAggiorna }}"-->
|
|
<meta charset="UTF-8">
|
|
<link href="https://fonts.googleapis.com/css?family=Hammersmith+One" rel="stylesheet">
|
|
<style type="text/css">
|
|
body {
|
|
font-family: 'Hammersmith One', sans-serif;
|
|
}
|
|
h1,h2,h3,h4 {
|
|
color: white;
|
|
text-align: center;
|
|
}
|
|
p {
|
|
color: white;
|
|
}
|
|
body {
|
|
background: #009999;
|
|
}
|
|
table {
|
|
table-layout: fixed;
|
|
empty-cells: show;
|
|
font-size: .6em;
|
|
}
|
|
div {
|
|
float: left;
|
|
}
|
|
.clearfix:after {
|
|
content: "";
|
|
display: table;
|
|
clear: both;
|
|
}
|
|
main {
|
|
background-color: #00bbbb;
|
|
}
|
|
tr, td {
|
|
}
|
|
td {
|
|
background: white;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
width: calc((70vw / {{.larghezza}}) - 3px);
|
|
height: calc(((100vh - 8em) / {{.altezza}}) - 8px);
|
|
}
|
|
.cibo {
|
|
background: #FFFF33;
|
|
padding: 0px;
|
|
}
|
|
.razza1 {
|
|
background: #00ff00;
|
|
padding: 0px;
|
|
}
|
|
.razza2 {
|
|
background: #FF0000;
|
|
padding: 0px;
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Go bug</h1>
|
|
<main class="clearfix">
|
|
<div class="tabella">
|
|
<table>
|
|
{{range $riga := .matrice}}
|
|
<tr>
|
|
{{range $cella := $riga}}
|
|
<td {{ if not $cella }}
|
|
class="vuoto"> </td>
|
|
{{ else }}
|
|
{{ if $cella.IsFood }}
|
|
class="cibo"
|
|
{{ else }}
|
|
class="razza1"
|
|
{{ end }}>{{ $cella.Health }}</td>
|
|
{{ end }}
|
|
{{ end }}
|
|
</tr>
|
|
{{ end }}
|
|
</table>
|
|
</div>
|
|
<div class="legenda">
|
|
<h1>legenda</h1>
|
|
<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>
|
|
<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>
|
|
<div style="float:right; display:block; width:65%; height:19%; ">Razza2</div>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|