From 31f5ceac2e33709528516348d23c025b3b3432f4 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Tue, 7 Jul 2020 18:25:15 +0200 Subject: [PATCH] try to clean up wonky weather template --- screenless/bureau/publications/news.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/screenless/bureau/publications/news.html b/screenless/bureau/publications/news.html index 401b0eb..74d6891 100644 --- a/screenless/bureau/publications/news.html +++ b/screenless/bureau/publications/news.html @@ -185,29 +185,30 @@

Weather

- <% + <%! daycount = 0 curr_day = "Today" %>
+
Today
% for period in forecast: - % if daycount > 4: - % continue - % endif - - % if period.day != curr_day: - % daycount += 1 - % curr_day = period["day"] + % if daycount <= 4: + % if period["day"] != curr_day:
${period["day"]}
- % endif + % endif + <%! + if period["day"] != curr_day: + daycount += 1 + curr_day = period["day"] + %>

${period["period"]}

${period["mintemp"]} – ${period["maxtemp"]}

- + % endif % endfor
@@ -229,7 +230,6 @@ % endfor - % endif