Different colors for cold/hot temperatures

This commit is contained in:
raul 2024-05-31 09:32:49 +02:00
parent f78c66fdc3
commit 4cdc2b0a18
2 changed files with 37 additions and 8 deletions

View File

@ -39,28 +39,37 @@
<th colspan="100%">{{ .Base.Nombre }}</th>
<tr>
<td>Dia</td>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Fecha }}</td>
<td class="date">{{ .Fecha }}</td>
{{ end }}
</tr>
<tr>
<td>Temp. Máxima</td>
<td class="left" colspan="100%">Temperatura mínima y máxima (°C)</td>
</tr>
<tr>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Temperatura.Maxima }}</td>
<td>
<cold>{{ .Temperatura.Minima }}</cold> / <hot>{{ .Temperatura.Maxima }}</hot>
</td>
{{ end }}
</tr>
<tr>
<td>Temp. Mínima</td>
{{ range .Base.Prediccion.Dia}}
<td>{{ .Temperatura.Minima }}</td>
<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>Índice UV</td>
<td class="left" colspan="100%">Índice UV</td>
</tr>
<tr>
{{ range .Base.Prediccion.Dia}}
<td>
{{ if eq .UV "" }}

View File

@ -26,6 +26,26 @@ li.hor {
margin-right: 20px;
}
td.left {
text-align: left;
padding-left: 5px;
}
td.date {
text-align: center;
padding-left: 5px;
padding-right: 5px;
}
cold {
color: darkcyan;
font-weight: 500;
}
hot {
color: darkorange;
font-weight: 500;
}
table * {
text-align: center;