Configure HTML table for storing weather data

This commit is contained in:
raul 2024-05-29 11:21:29 +02:00
parent 5c08a756c0
commit 6fe7383b36
2 changed files with 37 additions and 17 deletions

View File

@ -9,23 +9,40 @@
</head>
<body>
<p>Localidad: {{ .Base.Nombre }}</p>
<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>
<hr>
<p>Dia: {{ .Fecha }}</p>
<p>
Índice ultravioleta:
{{ if eq .UV ""}}
<tr>
<td>Índice UV</td>
{{ range .Base.Prediccion.Dia}}
<td>
{{ if eq .UV "" }}
No disponible!
{{ else }}
{{ .UV }}
{{ end }}
</p>
<!-- <p>Índice ultravioleta: {{ .UV }}</p> -->
</td>
{{ end }}
</tr>
</table>
</body>

View File

@ -1 +1,4 @@
table {
border: 1px solid black;
border-collapse: collapse;
}