diff options
Diffstat (limited to 'templates/show_entries.html')
| -rw-r--r-- | templates/show_entries.html | 43 | 
1 files changed, 34 insertions, 9 deletions
diff --git a/templates/show_entries.html b/templates/show_entries.html index 572f360..86451df 100644 --- a/templates/show_entries.html +++ b/templates/show_entries.html @@ -1,19 +1,44 @@  {% extends "layout.html" %}  {% block body %} +    <aside> +	<b>{% if devId == 1 %}Bedroom +	   {% else %}Mainfloor +	   {% endif %}Currently:</b> +	<ul class=current> +	    <li>{{ current.temperature }}°F</li> +	    <li>{{ current.humidity }}% humidity</li> +	</ul> +    </aside>      <figure> -	<embed type="image/svg+xml" src="/tgraph.svg" /> +	<embed type="image/png" src="/htgraph.png?deviceId={{ devId }}" />      </figure>      <figure> -	<embed type="image/svg+xml" src="/hgraph.svg" /> +	<embed type="image/png" src="/pgraph.png?deviceId={{ devId }}" />      </figure> +    {% if devId == 2 %}      <figure> -	<embed type="image/svg+xml" src="/pgraph.svg" /> +	<embed type="image/png" src="/bgraph.png?deviceId={{ devId }}" />      </figure> -    <ul class=weather> -	{% for entry in weather %} -	<li><h2>{{ entry.date }}</h2>Temp: {{ entry.temperature }}, Humidity: {{ entry.humidity }}, Pressure: {{ entry.pressure }} -	{% else %} -	<li><em>No entries here so far</em> +    {% endif %} + +    <hr> +    <h2>Readings from the past 24 hours</h2> +    <p> +    <table class=log> +	<tr> +	    <th>Timestamp</th> +	    <th>Temperature (C)</th> +	    <th>Humidity (%)</th> +	    <th>Pressure (hPa)</th> +	</tr> +	{% for entry in log %} +	<tr> +	    <td>{{ entry.date }}</td> +	    <td>{{ entry.temperature }}</td> +	    <td>{{ entry.humidity }}</td> +	    <td>{{ entry.pressure }}</td> +	</tr>  	{% endfor %} -    </ul> +    </table> +    </p>  {% endblock %}  | 
