Created
September 26, 2016 00:33
-
-
Save ericpulvino/8196a057493dec94d0f48c495ad5f706 to your computer and use it in GitHub Desktop.
Template for window_open.py flask app...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<title>Window Open?</title> | |
<head> | |
<style> | |
table { | |
font-family: arial, sans-serif; | |
border-collapse: collapse; | |
width: 100%; | |
} | |
td, th { | |
border: 1px solid #dddddd; | |
text-align: left; | |
padding: 8px; | |
} | |
tr:nth-child(even) { | |
background-color: #dddddd; | |
} | |
</style> | |
</head> | |
<body> | |
{% if window_open %} | |
<font size="20" color="green">OK to Leave the Window Open!</font><br> | |
{% else %} | |
<font size="20" color="red">DO NOT LEAVE THE WINDOW OPEN!</font><br> | |
{% endif %} | |
<br><br> | |
<table> | |
<tr> | |
<th>Next {{ evaluate_hours }} Hours</th> | |
<th>Conditions</th> | |
<th>Feels Like (F)</th> | |
<th>Humidity %</th> | |
</tr> | |
{% for row in full_output: %} | |
<tr> | |
<td>{{ row.time }}</td> | |
<td>{{ row.conditions }}</td> | |
<td>{{ row.temp|float|round(2) }}</td> | |
<td>{{ row.humidity }}</td> | |
</tr> | |
{% endfor %} | |
<tr> | |
<td></td> | |
<td><strong>Rain? = {{ rain }}</strong></td> | |
<td><strong>Max Temp = {{ max_temp }}</strong></td> | |
<td><strong>Max Humidity = {{ max_humidity }}</strong></td> | |
</tr> | |
</table> | |
<h1>Nest set to {{current_temp|round(2)}}F</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment