{#
	This template is processed using the Twig template engine
	Learn more at: http://twig.sensiolabs.org/doc/templates.html

	You can override this output by copying this file into your
	theme's directory, in a subfolder named "wunderground". The
	path to the file would look like this:
	/wp-content/themes/my-theme/wunderground/example.html
#}

{# Escape the HTML in the passed data automatically #}
{% autoescape 'html' %}

<div class="wu-wrapper wu-simple-forecast {{ class }}">

	{% include 'search-form.html' %}

	{% include 'alert.html' %}

	<div class="wu-forecast-wrapper">

		<table class="wu-table-{{numdays}}">

			{% if showdata.daynames is not empty %}
			<thead>
				<tr>
				{% for i in range( low = 0, high = (numdays - 1) ) %}
					<th scope="col">{{ forecast.text_forecast.days[i].title }}</th>
				{% endfor %}
				</tr>
			</thead>
			{% endif %}

			<tbody>
				<tr class="forecast">

				{# Show the current forecast #}
				{% if showdata.current is not empty and wunderground.current_observation|length > 0 %}
					{% set day = wunderground.current_observation %}
					{% include 'table-horizontal-cell.html' %}
				{% endif %}


				{% for i in range( low = 0, high = (numdays - 1) ) %}
					{% set day = wunderground.forecast.days[i] %}
					{% set summary = day.summary %}
					{% set forecast = day.summary.day %}

					{% include 'table-horizontal-cell.html' %}

					{% if showdata.night is not empty %}
						{% set forecast = day.summary.night %}
						{% include 'table-horizontal-cell.html' with { 'night' : true } %}
					{% endif %}

				{% endfor %}
				</tr>
			</tbody>
		</table>
	</div>
{% include 'copyright.html' %}

</div>

{% endautoescape %}
