From 52cd654f581e7986de524a97e9ae61bf38324228 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 4 Jun 2023 17:47:00 -0400 Subject: Started turning into flask app --- templates/base.html | 21 +++++++++++++++++++++ templates/daily.html | 13 +++++++++++++ templates/hourly.html | 18 ++++++++++++++++++ templates/index.html | 26 ++++++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/daily.html create mode 100644 templates/hourly.html create mode 100644 templates/index.html (limited to 'templates') 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 @@ + + + + + {% block title %} {% endblock %} + + + + + +
+ {% block content %} {% endblock %} +
+ + +{% block scripts %}{% endblock %} + + 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 @@ +{% extends 'base.html' %} +{% block content %} +
+{% for item in data %} +
+ {{ item.time.strftime("%a %x") }}
+ {{ item.high }}°F / {{ item.low }}°F
+ {{ item.short_forecast_am }}

+
+{% endfor %} +
+{% endblock %} + 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 @@ +{% extends 'base.html' %} + +{% block content %} +
+{% for item in data %} +
+ {{ item.time.strftime("%a %x %I:%M %p") }}
+ {{ item.temp }}°F
+ {{ item.humidity }}%
+ {{ item.precip_chance }}%
+ {{ item.precip_amount }}in
+ {{ item.wind_speed }}MPH
+ {{ item.wind_direction }}

+
+{% endfor %} +
+{% endblock %} + 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 @@ +{% extends 'base.html' %} + +{% block content %} +

{% block title %} Enter a Location {% endblock %}

+
+ {{ form.csrf_token }} +

+ {{ form.location.label }}
+ {{ form.location }} +

+

+ {{ form.days.label }}
+ {{ form.days }} +

+

+ {{ form.forecast_type.label }}
+ {{ form.forecast_type }} +

+

{{ form.submit() }}

+
+{% endblock %} + +
+ {{ form.name.label }} {{ form.name(size=20) }} + +
-- cgit v1.2.3