try to clean up wonky weather template

workspace
Brendan Howell 4 years ago
parent 51107030e3
commit 31f5ceac2e

@ -185,29 +185,30 @@
</div>
<div id="forecast">
<h2>Weather</h2>
<%
<%!
daycount = 0
curr_day = "Today"
%>
<div class="weatherday">
<h6>Today</h6>
% 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:
</div>
<div class="weatherday">
<h6>${period["day"]}</h6>
% endif
<%!
if period["day"] != curr_day:
daycount += 1
curr_day = period["day"]
%>
<div class="weatherperiod">
<img src="${period['symbol']}" />
<p class="weathertime">${period["period"]}</p>
<p class="weathertemp">${period["mintemp"]} ${period["maxtemp"]}</p>
</div>
% endif
% endfor
</div>
</div>
@ -229,7 +230,6 @@
</div>
</div>
% endfor
</table>
</div>
% endif
</body>

Loading…
Cancel
Save