diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 21 | ||||
| -rw-r--r-- | templates/daily.html | 13 | ||||
| -rw-r--r-- | templates/hourly.html | 18 | ||||
| -rw-r--r-- | templates/index.html | 26 | 
4 files changed, 78 insertions, 0 deletions
| diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..d464a5a --- /dev/null +++ b/templates/base.html | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <title>{% block title %} {% endblock %}</title> | ||
| 6 | <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}"> | ||
| 7 | <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css' ) }}"> | ||
| 8 | </head> | ||
| 9 | <body> | ||
| 10 | |||
| 11 | <div class="container"> | ||
| 12 | {% block content %} {% endblock %} | ||
| 13 | </div> | ||
| 14 | |||
| 15 | <footer> | ||
| 16 | {% block footer %} | ||
| 17 | {% endblock %} | ||
| 18 | </footer> | ||
| 19 | {% block scripts %}{% endblock %} | ||
| 20 | </body> | ||
| 21 | </html> | ||
| diff --git a/templates/daily.html b/templates/daily.html new file mode 100644 index 0000000..5eb765e --- /dev/null +++ b/templates/daily.html | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | {% extends 'base.html' %} | ||
| 2 | {% block content %} | ||
| 3 | <div class=weather-box> | ||
| 4 | {% for item in data %} | ||
| 5 | <div class=daily-box> | ||
| 6 | {{ item.time.strftime("%a %x") }} <br> | ||
| 7 | {{ item.high }}°F / {{ item.low }}°F <br> | ||
| 8 | {{ item.short_forecast_am }} <br><br> | ||
| 9 | </div> | ||
| 10 | {% endfor %} | ||
| 11 | </div> | ||
| 12 | {% endblock %} | ||
| 13 | |||
| diff --git a/templates/hourly.html b/templates/hourly.html new file mode 100644 index 0000000..56f9d9b --- /dev/null +++ b/templates/hourly.html | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | {% extends 'base.html' %} | ||
| 2 | |||
| 3 | {% block content %} | ||
| 4 | <div class=weather-box> | ||
| 5 | {% for item in data %} | ||
| 6 | <div class=daily-box> | ||
| 7 | {{ item.time.strftime("%a %x %I:%M %p") }} <br> | ||
| 8 | {{ item.temp }}°F <br> | ||
| 9 | {{ item.humidity }}%<br> | ||
| 10 | {{ item.precip_chance }}%<br> | ||
| 11 | {{ item.precip_amount }}in<br> | ||
| 12 | {{ item.wind_speed }}MPH<br> | ||
| 13 | {{ item.wind_direction }}<br><br> | ||
| 14 | </div> | ||
| 15 | {% endfor %} | ||
| 16 | </div> | ||
| 17 | {% endblock %} | ||
| 18 | |||
| diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..2d97379 --- /dev/null +++ b/templates/index.html | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | {% extends 'base.html' %} | ||
| 2 | |||
| 3 | {% block content %} | ||
| 4 | <h1>{% block title %} Enter a Location {% endblock %}</h1> | ||
| 5 | <form method="post"> | ||
| 6 | {{ form.csrf_token }} | ||
| 7 | <p> | ||
| 8 | {{ form.location.label }} <br> | ||
| 9 | {{ form.location }} | ||
| 10 | </p> | ||
| 11 | <p> | ||
| 12 | {{ form.days.label }} <br> | ||
| 13 | {{ form.days }} | ||
| 14 | </p> | ||
| 15 | <p> | ||
| 16 | {{ form.forecast_type.label }} <br> | ||
| 17 | {{ form.forecast_type }} | ||
| 18 | </p> | ||
| 19 | <p>{{ form.submit() }}</p> | ||
| 20 | </form> | ||
| 21 | {% endblock %} | ||
| 22 | |||
| 23 | <form method="POST" action="/"> | ||
| 24 | {{ form.name.label }} {{ form.name(size=20) }} | ||
| 25 | <input type="submit" value="Go"> | ||
| 26 | </form> | ||
