try to clean up wonky weather template

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

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

Loading…
Cancel
Save