aemet/cmd/templates/index.html

90 lines
2.4 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>
{{ range .Base.Prediccion.Dia}}
<td class="date">{{ .Fecha }}</td>
{{ end }}
</tr>
<tr>
<td class="left" colspan="100%">Temperatura mínima y máxima (°C)</td>
</tr>
<tr>
{{ range .Base.Prediccion.Dia}}
<td>
<cold>{{ .Temperatura.Minima }}</cold> / <hot>{{ .Temperatura.Maxima }}</hot>
</td>
{{ end }}
</tr>
<tr>
<td class="left" colspan="100%">Sens. térmica mínima y máxima (°C)</td>
</tr>
<tr>
{{ range .Base.Prediccion.Dia }}
<td>
<cold>{{ .Sens_Termica.Minima }}</cold> / <hot>{{ .Sens_Termica.Maxima }}</hot>
</td>
{{ end }}
</tr>
<tr>
<td class="left" colspan="100%">Índice UV</td>
</tr>
<tr>
{{ range .Base.Prediccion.Dia}}
<td>
{{ if eq .UV "" }}
No disponible!
{{ else }}
{{ .UV }}
{{ end }}
</td>
{{ end }}
</tr>
</table>
</div>
</div>
</body>
</html>