aemet/cmd/templates/index.html

81 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>AEMET Client</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div id="main">
<b>
<ul>
<li class="hor">
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">Source code</a></p>
</li>
<li class="hor">
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">API Docs</a></p>
</li>
<li class="hor">
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">But why though?</a></p>
</li>
<li class="hor">
<p>
<select class="optionCap"
onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
<option value="">Select...</option>
{{ range $key, $value := .Localidades }}
<option value="{{ $key }}" class="optionCap">{{ $key }}</option>
{{ end }}
</select>
</p>
</li>
</ul>
</b>
<table border=1>
<th colspan="100%">{{ .Base.Nombre }}</th>
<tr>
<td>Dia</td>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Fecha }}</td>
{{ end }}
</tr>
<tr>
<td>Temp. Máxima</td>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Temperatura.Maxima }}</td>
{{ end }}
</tr>
<tr>
<td>Temp. Mínima</td>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Temperatura.Minima }}</td>
{{ end }}
</tr>
<tr>
<td>Índice UV</td>
{{ range .Base.Prediccion.Dia}}
<td>
{{ if eq .UV "" }}
No disponible!
{{ else }}
{{ .UV }}
{{ end }}
</td>
{{ end }}
</tr>
</table>
</div>
</div>
</body>
</html>