From 6fe7383b36c8b6d0de499b18366bdca9cde56d44 Mon Sep 17 00:00:00 2001 From: raul Date: Wed, 29 May 2024 11:21:29 +0200 Subject: [PATCH] Configure HTML table for storing weather data --- cmd/templates/index.html | 49 +++++++++++++++++++++++++++------------- cmd/templates/style.css | 5 +++- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/cmd/templates/index.html b/cmd/templates/index.html index 9524df2..0cf30a8 100644 --- a/cmd/templates/index.html +++ b/cmd/templates/index.html @@ -9,23 +9,40 @@ -

Localidad: {{ .Base.Nombre }}

+ + + + + {{ range .Base.Prediccion.Dia}} + + {{ end }} + + + + {{ range .Base.Prediccion.Dia}} + + {{ end }} + + + + {{ range .Base.Prediccion.Dia}} + + {{ end }} + - {{ range .Base.Prediccion.Dia}} - -
-

Dia: {{ .Fecha }}

-

- Índice ultravioleta: - {{ if eq .UV ""}} - No disponible! - {{ else }} - {{ .UV }} - {{ end }} -

- - - {{ end }} + + + {{ range .Base.Prediccion.Dia}} + + {{ end }} + +
{{ .Base.Nombre }}
Dia{{ .Fecha }}
Temp. Máxima{{ .Temperatura.Maxima }}
Temp. Mínima{{ .Temperatura.Minima }}
Índice UV + {{ if eq .UV "" }} + No disponible! + {{ else }} + {{ .UV }} + {{ end }} +
diff --git a/cmd/templates/style.css b/cmd/templates/style.css index 8b13789..a4e0c13 100644 --- a/cmd/templates/style.css +++ b/cmd/templates/style.css @@ -1 +1,4 @@ - +table { + border: 1px solid black; + border-collapse: collapse; +}