From 4979d1ac22ab363fa8c497f803b17aae26367afb Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Tue, 25 May 2021 20:45:59 +0200 Subject: [PATCH] Refactoring: vaccination --- .../blueprints/data_owid/owid_views.py | 22 +++--- .../continent/all/owid_continent_all.html | 29 +++++++ .../owid_continent_all_pagination.html | 0 .../{ => all}/owid_continent_all_table.html | 0 .../{ => one}/owid_continent_one.html | 6 +- .../owid_continent_one_pagination.html | 0 .../all/owid_country_all.html} | 6 +- .../owid_country_all_pagination.html | 0 .../{ => all}/owid_country_all_table.html | 24 +----- .../all/owid_country_all_table_head.html | 20 +++++ .../owid_country_one_germany.html | 4 +- .../owid_country_one_germany_pagination.html | 0 .../country/{ => one}/owid_country_one.html | 4 +- .../owid_country_one_pagination.html | 0 .../{ => all}/owid_date_reported_all.html | 6 +- .../owid_date_reported_all_pagination.html | 0 .../owid_date_reported_all_table.html | 0 ...id_date_reported_one_cases_cumulative.html | 6 +- ...orted_one_cases_cumulative_pagination.html | 0 .../owid_date_reported_one_cases_new.html | 6 +- ...ate_reported_one_cases_new_pagination.html | 0 ...d_date_reported_one_deaths_cumulative.html | 6 +- ...rted_one_deaths_cumulative_pagination.html | 0 .../owid_date_reported_one_deaths_new.html | 6 +- ...te_reported_one_deaths_new_pagination.html | 0 .../{ => one}/owid_date_reported_one.html | 4 +- .../owid_date_reported_one_pagination.html | 0 .../owid_flat.html} | 9 ++- .../owid/flat/owid_flat_pagination.html | 37 +++++++++ .../templates/owid/flat/owid_flat_table.html | 75 +++++++++++++++++++ .../owid/flat/owid_flat_table_header.html | 61 +++++++++++++++ .../owid/imported/owid_imported_table.html | 65 +--------------- .../imported/owid_imported_table_head.html | 61 +++++++++++++++ .../owid/navigation/owid_navtabs.html | 1 - .../owid/owid_data/owid_data_table.html | 65 +--------------- .../owid/owid_data/owid_data_table_head.html | 62 +++++++++++++++ 36 files changed, 401 insertions(+), 184 deletions(-) create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all.html rename src/flask_covid19/blueprints/data_owid/templates/owid/continent/{ => all}/owid_continent_all_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/continent/{ => all}/owid_continent_all_table.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/continent/{ => one}/owid_continent_one.html (67%) rename src/flask_covid19/blueprints/data_owid/templates/owid/continent/{ => one}/owid_continent_one_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/{continent/owid_continent_all.html => country/all/owid_country_all.html} (74%) rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => all}/owid_country_all_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => all}/owid_country_all_table.html (66%) create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table_head.html rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => germany}/owid_country_one_germany.html (78%) rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => germany}/owid_country_one_germany_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => one}/owid_country_one.html (78%) rename src/flask_covid19/blueprints/data_owid/templates/owid/country/{ => one}/owid_country_one_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => all}/owid_date_reported_all.html (69%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => all}/owid_date_reported_all_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => all}/owid_date_reported_all_table.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => cases}/owid_date_reported_one_cases_cumulative.html (69%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => cases}/owid_date_reported_one_cases_cumulative_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => cases}/owid_date_reported_one_cases_new.html (70%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => cases}/owid_date_reported_one_cases_new_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => deaths}/owid_date_reported_one_deaths_cumulative.html (69%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => deaths}/owid_date_reported_one_deaths_cumulative_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => deaths}/owid_date_reported_one_deaths_new.html (70%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => deaths}/owid_date_reported_one_deaths_new_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => one}/owid_date_reported_one.html (78%) rename src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/{ => one}/owid_date_reported_one_pagination.html (100%) rename src/flask_covid19/blueprints/data_owid/templates/owid/{country/owid_country_all.html => flat/owid_flat.html} (69%) create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_pagination.html create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table.html create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table_header.html create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table_head.html create mode 100644 src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table_head.html diff --git a/src/flask_covid19/blueprints/data_owid/owid_views.py b/src/flask_covid19/blueprints/data_owid/owid_views.py index 085dd278..16746cb5 100644 --- a/src/flask_covid19/blueprints/data_owid/owid_views.py +++ b/src/flask_covid19/blueprints/data_owid/owid_views.py @@ -69,7 +69,7 @@ def url_owid_date_reported_all(page: int = 1): flash("No regions in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_all.html', + 'owid/date_reported/all/owid_date_reported_all.html', page_data=page_data, page_info=page_info) @@ -89,7 +89,7 @@ def url_owid_date_reported_one(date_reported_id: int, page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_one.html', + 'owid/date_reported/one/owid_date_reported_one.html', owid_date_reported=date_reported, page_data=page_data, page_info=page_info) @@ -110,7 +110,7 @@ def url_owid_date_reported_one_cases_new(date_reported_id: int, page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_one_cases_new.html', + 'owid/date_reported/cases/owid_date_reported_one_cases_new.html', owid_date_reported=date_reported, page_data=page_data, page_info=page_info) @@ -131,7 +131,7 @@ def url_owid_date_reported_one_cases_cumulative(date_reported_id: int, page: int flash("No data in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_one_cases_cumulative.html', + 'owid/date_reported/cases/owid_date_reported_one_cases_cumulative.html', owid_date_reported=date_reported, page_data=page_data, page_info=page_info) @@ -152,7 +152,7 @@ def url_owid_date_reported_one_deaths_new(date_reported_id: int, page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_one_deaths_new.html', + 'owid/date_reported/deaths/owid_date_reported_one_deaths_new.html', owid_date_reported=date_reported, page_data=page_data, page_info=page_info) @@ -173,7 +173,7 @@ def url_owid_date_reported_one_deaths_cumulative(date_reported_id: int, page: in flash("No data in the database.") page_data = None return render_template( - 'owid/date_reported/owid_date_reported_one_deaths_cumulative.html', + 'owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative.html', owid_date_reported=date_reported, page_data=page_data, page_info=page_info) @@ -192,7 +192,7 @@ def url_owid_continent_all(page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/continent/owid_continent_all.html', + 'owid/continent/all/owid_continent_all.html', page_data=page_data, page_info=page_info) @@ -212,7 +212,7 @@ def url_owid_continent_one(continent_id: int, page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/continent/owid_continent_one.html', + 'owid/continent/one/owid_continent_one.html', owid_continent=owid_continent_one, page_data=page_data, page_info=page_info) @@ -231,7 +231,7 @@ def url_owid_country_all(page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/country/owid_country_all.html', + 'owid/country/all/owid_country_all.html', page_data=page_data, page_info=page_info) @@ -251,7 +251,7 @@ def url_owid_country_one(country_id: int, page: int = 1): flash("No data in the database.") page_data = None return render_template( - 'owid/country/owid_country_one.html', + 'owid/country/one/owid_country_one.html', owid_country=owid_country_one, page_data=page_data, page_info=page_info) @@ -280,7 +280,7 @@ def url_owid_country_one_germany(page: int = 1): "on continent " + my_region + " " ) return render_template( - 'owid/country/owid_country_one_germany.html', + 'owid/country/germany/owid_country_one_germany.html', owid_country=owid_country_germany, page_data=page_data, page_info=page_info) diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all.html new file mode 100644 index 00000000..a68bdd47 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all.html @@ -0,0 +1,29 @@ +{% extends 'app_application/layout/page_layout.html' %} + +{% block content %} + {{super()}} + {% include 'owid/navigation/owid_navtabs.html' %} + + <div class="container"> + <div class="row"> + <div class="col"> + {% include 'owid/continent/all/owid_continent_all_pagination.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/continent/all/owid_continent_all_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/continent/all/owid_continent_all_pagination.html' %} + </div> + </div> + </div> +{% endblock %} + + +{% block footer_container %} + +{% endblock %} diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all_table.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_one.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/one/owid_continent_one.html similarity index 67% rename from src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_one.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/continent/one/owid_continent_one.html index 7e0c6669..acd2d441 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_one.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/one/owid_continent_one.html @@ -7,17 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_one_pagination.html' %} + {% include 'owid/continent/one/owid_continent_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_all_table.html' %} + {% include 'owid/country/all/owid_country_all_table.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_one_pagination.html' %} + {% include 'owid/continent/one/owid_continent_one_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_one_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/one/owid_continent_one_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_one_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/continent/one/owid_continent_one_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all.html similarity index 74% rename from src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all.html index 0e995e32..74269a55 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/owid_continent_all.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all.html @@ -7,17 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_all_pagination.html' %} + {% include 'owid/country/all/owid_country_all_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_all_table.html' %} + {% include 'owid/country/all/owid_country_all_table.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_all_pagination.html' %} + {% include 'owid/country/all/owid_country_all_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table.html similarity index 66% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all_table.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table.html index be6613db..a9696453 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all_table.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table.html @@ -1,26 +1,7 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> - <tr> - <th scope="col">iso code</th> - <th scope="col">continent</th> - <th scope="col">location</th> - <th scope="col">population</th> - <th scope="col">population density</th> - <th scope="col">median age</th> - <th scope="col">aged 65 older</th> - <th scope="col">aged 70 older</th> - <th scope="col">gdp per capita</th> - <th scope="col">extreme poverty</th> - <th scope="col">cardiovasc death rate</th> - <th scope="col">diabetes prevalence</th> - <th scope="col">female smokers</th> - <th scope="col">male smokers</th> - <th scope="col">handwashing facilities</th> - <th scope="col">hospital beds per thousand</th> - <th scope="col">life expectancy</th> - <th scope="col">human development index</th> - </tr> + {% include 'owid/country/all/owid_country_all_table_head.html' %} </thead> <tbody> {% for owid_country in page_data.items %} @@ -58,5 +39,8 @@ </tr> {% endfor %} </tbody> + <tfoot> + {% include 'owid/country/all/owid_country_all_table_head.html' %} + </tfoot> </table> </div> \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table_head.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table_head.html new file mode 100644 index 00000000..31cf7175 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/country/all/owid_country_all_table_head.html @@ -0,0 +1,20 @@ + <tr> + <th scope="col">iso code</th> + <th scope="col">continent</th> + <th scope="col">location</th> + <th scope="col">population</th> + <th scope="col">population density</th> + <th scope="col">median age</th> + <th scope="col">aged 65 older</th> + <th scope="col">aged 70 older</th> + <th scope="col">gdp per capita</th> + <th scope="col">extreme poverty</th> + <th scope="col">cardiovasc death rate</th> + <th scope="col">diabetes prevalence</th> + <th scope="col">female smokers</th> + <th scope="col">male smokers</th> + <th scope="col">handwashing facilities</th> + <th scope="col">hospital beds per thousand</th> + <th scope="col">life expectancy</th> + <th scope="col">human development index</th> + </tr> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_germany.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/germany/owid_country_one_germany.html similarity index 78% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_germany.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/germany/owid_country_one_germany.html index f901f1b3..d41b5089 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_germany.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/country/germany/owid_country_one_germany.html @@ -7,7 +7,7 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_pagination.html' %} + {% include 'owid/country/one/owid_country_one_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_pagination.html' %} + {% include 'owid/country/one/owid_country_one_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_germany_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/germany/owid_country_one_germany_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_germany_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/germany/owid_country_one_germany_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/one/owid_country_one.html similarity index 78% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/one/owid_country_one.html index f901f1b3..d41b5089 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/country/one/owid_country_one.html @@ -7,7 +7,7 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_pagination.html' %} + {% include 'owid/country/one/owid_country_one_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_pagination.html' %} + {% include 'owid/country/one/owid_country_one_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/country/one/owid_country_one_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_one_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/country/one/owid_country_one_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all.html similarity index 69% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all.html index 3a8b84f1..bff4507f 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all.html @@ -7,17 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_all_pagination.html' %} + {% include 'owid/date_reported/all/owid_date_reported_all_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_all_table.html' %} + {% include 'owid/date_reported/all/owid_date_reported_all_table.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_all_pagination.html' %} + {% include 'owid/date_reported/all/owid_date_reported_all_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all_table.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_all_table.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/all/owid_date_reported_all_table.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_cumulative.html similarity index 69% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_cumulative.html index 02acc560..b6bc8758 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_cumulative.html @@ -2,12 +2,12 @@ {% block content %} {{super()}} - {% include 'owid/fragments/fragment_owid_navtabs.html' %} + {% include 'owid/navigation/owid_navtabs.html' %} <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html' %} + {% include 'owid/date_reported/cases/owid_date_reported_one_cases_cumulative_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html' %} + {% include 'owid/date_reported/cases/owid_date_reported_one_cases_cumulative_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_cumulative_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_cumulative_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_new.html similarity index 70% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_new.html index e989d108..1005f326 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_new.html @@ -2,12 +2,12 @@ {% block content %} {{super()}} - {% include 'owid/fragments/fragment_owid_navtabs.html' %} + {% include 'owid/navigation/owid_navtabs.html' %} <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_cases_new_pagination.html' %} + {% include 'owid/date_reported/cases/owid_date_reported_one_cases_new_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_cases_new_pagination.html' %} + {% include 'owid/date_reported/cases/owid_date_reported_one_cases_new_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_new_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_new_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_cases_new_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/cases/owid_date_reported_one_cases_new_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative.html similarity index 69% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative.html index 8b537af7..92a738d0 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative.html @@ -2,12 +2,12 @@ {% block content %} {{super()}} - {% include 'owid/fragments/fragment_owid_navtabs.html' %} + {% include 'owid/navigation/owid_navtabs.html' %} <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html' %} + {% include 'owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html' %} + {% include 'owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_cumulative_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_new.html similarity index 70% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_new.html index a898c417..7574110c 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_new.html @@ -2,12 +2,12 @@ {% block content %} {{super()}} - {% include 'owid/fragments/fragment_owid_navtabs.html' %} + {% include 'owid/navigation/owid_navtabs.html' %} <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_deaths_new_pagination.html' %} + {% include 'owid/date_reported/deaths/owid_date_reported_one_deaths_new_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_deaths_new_pagination.html' %} + {% include 'owid/date_reported/deaths/owid_date_reported_one_deaths_new_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_new_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_new_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_deaths_new_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/deaths/owid_date_reported_one_deaths_new_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/one/owid_date_reported_one.html similarity index 78% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/one/owid_date_reported_one.html index 9581a309..191e763b 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/one/owid_date_reported_one.html @@ -7,7 +7,7 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_pagination.html' %} + {% include 'owid/date_reported/one/owid_date_reported_one_pagination.html' %} </div> </div> <div class="row"> @@ -17,7 +17,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_pagination.html' %} + {% include 'owid/date_reported/one/owid_date_reported_one_pagination.html' %} </div> </div> </div> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/one/owid_date_reported_one_pagination.html similarity index 100% rename from src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/owid_date_reported_one_pagination.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/date_reported/one/owid_date_reported_one_pagination.html diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all.html b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat.html similarity index 69% rename from src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all.html rename to src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat.html index 5c957bc7..bbf1929c 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/country/owid_country_all.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat.html @@ -7,17 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_all_pagination.html' %} + {% include 'owid/flat/owid_flat_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_all_table.html' %} + {% include 'owid/flat/owid_flat_table.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_all_pagination.html' %} + {% include 'owid/flat/owid_flat_pagination.html' %} </div> </div> </div> @@ -27,3 +27,6 @@ {% block footer_container %} {% endblock %} + + + diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_pagination.html b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_pagination.html new file mode 100644 index 00000000..841ee743 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_pagination.html @@ -0,0 +1,37 @@ + {% if page_data.pages > 1 %} + <!-- previous page --> + <ul class="pagination"> + {% if page_data.has_prev %} + <li class="page-item"> + <a class="page-link" + href="{{ url_for('owid.url_owid_flat', page=page_data.prev_num) }}">Previous</a> + </li> + {% endif %} + <!-- all page numbers --> + {% for page_num in page_data.iter_pages() %} + {% if page_num %} + {% if page_num != page_data.page %} + <li class="page-item"> + <a class="page-link" + href="{{ url_for('owid.url_owid_flat', page=page_num) }}">{{ page_num }}</a> + </li> + {% else %} + <li class="page-item active"> + <a class="page-link" href="#">{{ page_num }}</a> + </li> + {% endif %} + {% else %} + <li class="page-item"> + <span class="ellipsis page-link my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" + href="{{ url_for('owid.url_owid_flat', page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table.html new file mode 100644 index 00000000..5c6b5159 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table.html @@ -0,0 +1,75 @@ + <div class="table-responsive"> + <table class="table table-hover table-striped table-dark"> + <thead> + {% include 'owid/flat/owid_flat_table_header.html' %} + </thead> + <tbody> + {% for owid_flat in page_data.items %} + <tr> + <td>{{ owid_flat.continent }}</td> + <td>{{ owid_flat.iso_code }}</td> + <td>{{ owid_flat.location }}</td> + <td>{{ owid_flat.date }}</td> + <td>{{ owid_flat.total_cases }}</td> + <td>{{ owid_flat.new_cases }}</td> + <td>{{ owid_flat.new_cases_smoothed }}</td> + <td>{{ owid_flat.total_deaths }}</td> + <td>{{ owid_flat.new_deaths }}</td> + <td>{{ owid_flat.new_deaths_smoothed }}</td> + <td>{{ owid_flat.total_cases_per_million }}</td> + <td>{{ owid_flat.new_cases_per_million }}</td> + <td>{{ owid_flat.new_cases_smoothed_per_million }}</td> + <td>{{ owid_flat.total_deaths_per_million }}</td> + <td>{{ owid_flat.new_deaths_per_million }}</td> + <td>{{ owid_flat.new_deaths_smoothed_per_million }}</td> + <td>{{ owid_flat.reproduction_rate }}</td> + <td>{{ owid_flat.icu_patients }}</td> + <td>{{ owid_flat.icu_patients_per_million }}</td> + <td>{{ owid_flat.hosp_patients }}</td> + <td>{{ owid_flat.hosp_patients_per_million }}</td> + <td>{{ owid_flat.weekly_icu_admissions }}</td> + <td>{{ owid_flat.weekly_icu_admissions_per_million }}</td> + <td>{{ owid_flat.weekly_hosp_admissions }}</td> + <td>{{ owid_flat.weekly_hosp_admissions_per_million }}</td> + <td>{{ owid_flat.new_tests }}</td> + <td>{{ owid_flat.total_tests }}</td> + <td>{{ owid_flat.total_tests_per_thousand }}</td> + <td>{{ owid_flat.new_tests_per_thousand }}</td> + <td>{{ owid_flat.new_tests_smoothed }}</td> + <td>{{ owid_flat.new_tests_smoothed_per_thousand }}</td> + <td>{{ owid_flat.positive_rate }}</td> + <td>{{ owid_flat.tests_per_case }}</td> + <td>{{ owid_flat.tests_units }}</td> + <td>{{ owid_flat.total_vaccinations }}</td> + <td>{{ owid_flat.people_vaccinated }}</td> + <td>{{ owid_flat.people_fully_vaccinated }}</td> + <td>{{ owid_flat.new_vaccinations }}</td> + <td>{{ owid_flat.new_vaccinations_smoothed }}</td> + <td>{{ owid_flat.total_vaccinations_per_hundred }}</td> + <td>{{ owid_flat.people_vaccinated_per_hundred }}</td> + <td>{{ owid_flat.people_fully_vaccinated_per_hundred }}</td> + <td>{{ owid_flat.new_vaccinations_smoothed_per_million }}</td> + <td>{{ owid_flat.stringency_index }}</td> + <td>{{ owid_flat.population }}</td> + <td>{{ owid_flat.population_density }}</td> + <td>{{ owid_flat.median_age }}</td> + <td>{{ owid_flat.aged_65_older }}</td> + <td>{{ owid_flat.aged_70_older }}</td> + <td>{{ owid_flat.gdp_per_capita }}</td> + <td>{{ owid_flat.extreme_poverty }}</td> + <td>{{ owid_flat.cardiovasc_death_rate }}</td> + <td>{{ owid_flat.diabetes_prevalence }}</td> + <td>{{ owid_flat.female_smokers }}</td> + <td>{{ owid_flat.male_smokers }}</td> + <td>{{ owid_flat.handwashing_facilities }}</td> + <td>{{ owid_flat.hospital_beds_per_thousand }}</td> + <td>{{ owid_flat.life_expectancy }}</td> + <td>{{ owid_flat.human_development_index }}</td> + </tr> + {% endfor %} + </tbody> + <tfoot> + {% include 'owid/flat/owid_flat_table_header.html' %} + </tfoot> + </table> + </div> \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table_header.html b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table_header.html new file mode 100644 index 00000000..10359047 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/flat/owid_flat_table_header.html @@ -0,0 +1,61 @@ + <tr> + <th scope="col">continent</th> + <th scope="col">iso code</th> + <th scope="col">location</th> + <th scope="col">date</th> + <th scope="col">total cases</th> + <th scope="col">new cases</th> + <th scope="col">new cases smoothed</th> + <th scope="col">total deaths</th> + <th scope="col">new deaths</th> + <th scope="col">new deaths smoothed</th> + <th scope="col">total cases per million</th> + <th scope="col">new cases per million</th> + <th scope="col">new cases smoothed per million</th> + <th scope="col">total deaths per million</th> + <th scope="col">new_deaths per million</th> + <th scope="col">new deaths smoothed per million</th> + <th scope="col">reproduction rate</th> + <th scope="col">icu patients</th> + <th scope="col">icu patients per million</th> + <th scope="col">hosp patients</th> + <th scope="col">hosp patients per million</th> + <th scope="col">weekly icu admissions</th> + <th scope="col">weekly icu admissions per million</th> + <th scope="col">weekly hosp admissions</th> + <th scope="col">weekly hosp admissions per million</th> + <th scope="col">new tests</th> + <th scope="col">total tests</th> + <th scope="col">total tests per thousand</th> + <th scope="col">new tests per thousand</th> + <th scope="col">new tests smoothed</th> + <th scope="col">new tests smoothed per thousand</th> + <th scope="col">positive rate</th> + <th scope="col">tests per case</th> + <th scope="col">tests units</th> + <th scope="col">total vaccinations</th> + <th scope="col">people vaccinated</th> + <th scope="col">people fully vaccinated</th> + <th scope="col">new vaccinations</th> + <th scope="col">new vaccinations smoothed</th> + <th scope="col">total vaccinations per hundred</th> + <th scope="col">people vaccinated per hundred</th> + <th scope="col">people fully vaccinated per hundred</th> + <th scope="col">new vaccinations smoothed per million</th> + <th scope="col">stringency index</th> + <th scope="col">population</th> + <th scope="col">population density</th> + <th scope="col">median age</th> + <th scope="col">aged 65 older</th> + <th scope="col">aged 70 older</th> + <th scope="col">gdp per capita</th> + <th scope="col">extreme poverty</th> + <th scope="col">cardiovasc death rate</th> + <th scope="col">diabetes prevalence</th> + <th scope="col">female smokers</th> + <th scope="col">male smokers</th> + <th scope="col">handwashing facilities</th> + <th scope="col">hospital beds per thousand</th> + <th scope="col">life expectancy</th> + <th scope="col">human development index</th> + </tr> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table.html index 0dec3701..ac8c1c07 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table.html @@ -1,67 +1,7 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead> - <tr> - <th scope="col">continent</th> - <th scope="col">iso code</th> - <th scope="col">location</th> - <th scope="col">date</th> - <th scope="col">total cases</th> - <th scope="col">new cases</th> - <th scope="col">new cases smoothed</th> - <th scope="col">total deaths</th> - <th scope="col">new deaths</th> - <th scope="col">new deaths smoothed</th> - <th scope="col">total cases per million</th> - <th scope="col">new cases per million</th> - <th scope="col">new cases smoothed per million</th> - <th scope="col">total deaths per million</th> - <th scope="col">new_deaths per million</th> - <th scope="col">new deaths smoothed per million</th> - <th scope="col">reproduction rate</th> - <th scope="col">icu patients</th> - <th scope="col">icu patients per million</th> - <th scope="col">hosp patients</th> - <th scope="col">hosp patients per million</th> - <th scope="col">weekly icu admissions</th> - <th scope="col">weekly icu admissions per million</th> - <th scope="col">weekly hosp admissions</th> - <th scope="col">weekly hosp admissions per million</th> - <th scope="col">new tests</th> - <th scope="col">total tests</th> - <th scope="col">total tests per thousand</th> - <th scope="col">new tests per thousand</th> - <th scope="col">new tests smoothed</th> - <th scope="col">new tests smoothed per thousand</th> - <th scope="col">positive rate</th> - <th scope="col">tests per case</th> - <th scope="col">tests units</th> - <th scope="col">total vaccinations</th> - <th scope="col">people vaccinated</th> - <th scope="col">people fully vaccinated</th> - <th scope="col">new vaccinations</th> - <th scope="col">new vaccinations smoothed</th> - <th scope="col">total vaccinations per hundred</th> - <th scope="col">people vaccinated per hundred</th> - <th scope="col">people fully vaccinated per hundred</th> - <th scope="col">new vaccinations smoothed per million</th> - <th scope="col">stringency index</th> - <th scope="col">population</th> - <th scope="col">population density</th> - <th scope="col">median age</th> - <th scope="col">aged 65 older</th> - <th scope="col">aged 70 older</th> - <th scope="col">gdp per capita</th> - <th scope="col">extreme poverty</th> - <th scope="col">cardiovasc death rate</th> - <th scope="col">diabetes prevalence</th> - <th scope="col">female smokers</th> - <th scope="col">male smokers</th> - <th scope="col">handwashing facilities</th> - <th scope="col">hospital beds per thousand</th> - <th scope="col">life expectancy</th> - <th scope="col">human development index</th> - </tr> + {% include 'owid/imported/owid_imported_table_head.html' %} </thead> <tbody> {% for owid_import in page_data.items %} @@ -128,5 +68,8 @@ </tr> {% endfor %} </tbody> + <tfoot> + {% include 'owid/imported/owid_imported_table_head.html' %} + </tfoot> </table> </div> \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table_head.html b/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table_head.html new file mode 100644 index 00000000..10359047 --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/imported/owid_imported_table_head.html @@ -0,0 +1,61 @@ + <tr> + <th scope="col">continent</th> + <th scope="col">iso code</th> + <th scope="col">location</th> + <th scope="col">date</th> + <th scope="col">total cases</th> + <th scope="col">new cases</th> + <th scope="col">new cases smoothed</th> + <th scope="col">total deaths</th> + <th scope="col">new deaths</th> + <th scope="col">new deaths smoothed</th> + <th scope="col">total cases per million</th> + <th scope="col">new cases per million</th> + <th scope="col">new cases smoothed per million</th> + <th scope="col">total deaths per million</th> + <th scope="col">new_deaths per million</th> + <th scope="col">new deaths smoothed per million</th> + <th scope="col">reproduction rate</th> + <th scope="col">icu patients</th> + <th scope="col">icu patients per million</th> + <th scope="col">hosp patients</th> + <th scope="col">hosp patients per million</th> + <th scope="col">weekly icu admissions</th> + <th scope="col">weekly icu admissions per million</th> + <th scope="col">weekly hosp admissions</th> + <th scope="col">weekly hosp admissions per million</th> + <th scope="col">new tests</th> + <th scope="col">total tests</th> + <th scope="col">total tests per thousand</th> + <th scope="col">new tests per thousand</th> + <th scope="col">new tests smoothed</th> + <th scope="col">new tests smoothed per thousand</th> + <th scope="col">positive rate</th> + <th scope="col">tests per case</th> + <th scope="col">tests units</th> + <th scope="col">total vaccinations</th> + <th scope="col">people vaccinated</th> + <th scope="col">people fully vaccinated</th> + <th scope="col">new vaccinations</th> + <th scope="col">new vaccinations smoothed</th> + <th scope="col">total vaccinations per hundred</th> + <th scope="col">people vaccinated per hundred</th> + <th scope="col">people fully vaccinated per hundred</th> + <th scope="col">new vaccinations smoothed per million</th> + <th scope="col">stringency index</th> + <th scope="col">population</th> + <th scope="col">population density</th> + <th scope="col">median age</th> + <th scope="col">aged 65 older</th> + <th scope="col">aged 70 older</th> + <th scope="col">gdp per capita</th> + <th scope="col">extreme poverty</th> + <th scope="col">cardiovasc death rate</th> + <th scope="col">diabetes prevalence</th> + <th scope="col">female smokers</th> + <th scope="col">male smokers</th> + <th scope="col">handwashing facilities</th> + <th scope="col">hospital beds per thousand</th> + <th scope="col">life expectancy</th> + <th scope="col">human development index</th> + </tr> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/navigation/owid_navtabs.html b/src/flask_covid19/blueprints/data_owid/templates/owid/navigation/owid_navtabs.html index 1cabcd37..5cc6f252 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/navigation/owid_navtabs.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/navigation/owid_navtabs.html @@ -1,5 +1,4 @@ - <div class="container"> <div class="row-cols-1"> <nav> diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table.html index 148ac80a..4bf2aa64 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table.html @@ -1,67 +1,7 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> - <tr> - <th scope="col">iso code</th> - <th scope="col">continent</th> - <th scope="col">location</th> - <th scope="col">date</th> - <th scope="col">total cases</th> - <th scope="col">new cases</th> - <th scope="col">new cases smoothed</th> - <th scope="col">total deaths</th> - <th scope="col">new deaths</th> - <th scope="col">new deaths smoothed</th> - <th scope="col">total cases per million</th> - <th scope="col">new cases per million</th> - <th scope="col">new cases smoothed per million</th> - <th scope="col">total deaths per million</th> - <th scope="col">new deaths per million</th> - <th scope="col">new deaths smoothed per million</th> - <th scope="col">reproduction rate</th> - <th scope="col">icu patients</th> - <th scope="col">icu patients per million</th> - <th scope="col">hosp patients</th> - <th scope="col">hosp patients per million</th> - <th scope="col">weekly icu admissions</th> - <th scope="col">weekly icu admissions per million</th> - <th scope="col">weekly hosp admissions</th> - <th scope="col">weekly hosp admissions per million</th> - <th scope="col">new tests</th> - <th scope="col">total tests</th> - <th scope="col">total tests per thousand</th> - <th scope="col">new tests per thousand</th> - <th scope="col">new tests smoothed</th> - <th scope="col">new tests smoothed per thousand</th> - <th scope="col">positive rate</th> - <th scope="col">tests per case</th> - <th scope="col">tests units</th> - <th scope="col">total vaccinations</th> - <th scope="col">people vaccinated</th> - <th scope="col">people fully vaccinated</th> - <th scope="col">new vaccinations</th> - <th scope="col">new vaccinations_smoothed</th> - <th scope="col">total vaccinations per hundred</th> - <th scope="col">people vaccinated per hundred</th> - <th scope="col">people fully vaccinated per hundred</th> - <th scope="col">new vaccinations smoothed per million</th> - <th scope="col">stringency index</th> - <th scope="col">population</th> - <th scope="col">population density</th> - <th scope="col">median age</th> - <th scope="col">aged 65 older</th> - <th scope="col">aged 70 older</th> - <th scope="col">gdp per capita</th> - <th scope="col">extreme poverty</th> - <th scope="col">cardiovasc death rate</th> - <th scope="col">diabetes prevalence</th> - <th scope="col">female smokers</th> - <th scope="col">male smokers</th> - <th scope="col">handwashing facilities</th> - <th scope="col">hospital beds per thousand</th> - <th scope="col">life expectancy</th> - <th scope="col">human development index</th> - </tr> + {% include 'owid/country/all/owid_country_all_table_head.html' %} </thead> <tbody> {% for owid in page_data.items %} @@ -204,5 +144,8 @@ </tr> {% endfor %} </tbody> + <tfoot> + {% include 'owid/country/all/owid_country_all_table_head.html' %} + </tfoot> </table> </div> \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table_head.html b/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table_head.html new file mode 100644 index 00000000..85f0806c --- /dev/null +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/owid_data/owid_data_table_head.html @@ -0,0 +1,62 @@ + <tr> + <th scope="col">iso code</th> + <th scope="col">continent</th> + <th scope="col">location</th> + <th scope="col">date</th> + <th scope="col">total cases</th> + <th scope="col">new cases</th> + <th scope="col">new cases smoothed</th> + <th scope="col">total deaths</th> + <th scope="col">new deaths</th> + <th scope="col">new deaths smoothed</th> + <th scope="col">total cases per million</th> + <th scope="col">new cases per million</th> + <th scope="col">new cases smoothed per million</th> + <th scope="col">total deaths per million</th> + <th scope="col">new deaths per million</th> + <th scope="col">new deaths smoothed per million</th> + <th scope="col">reproduction rate</th> + <th scope="col">icu patients</th> + <th scope="col">icu patients per million</th> + <th scope="col">hosp patients</th> + <th scope="col">hosp patients per million</th> + <th scope="col">weekly icu admissions</th> + <th scope="col">weekly icu admissions per million</th> + <th scope="col">weekly hosp admissions</th> + <th scope="col">weekly hosp admissions per million</th> + <th scope="col">new tests</th> + <th scope="col">total tests</th> + <th scope="col">total tests per thousand</th> + <th scope="col">new tests per thousand</th> + <th scope="col">new tests smoothed</th> + <th scope="col">new tests smoothed per thousand</th> + <th scope="col">positive rate</th> + <th scope="col">tests per case</th> + <th scope="col">tests units</th> + <th scope="col">total vaccinations</th> + <th scope="col">people vaccinated</th> + <th scope="col">people fully vaccinated</th> + <th scope="col">new vaccinations</th> + <th scope="col">new vaccinations_smoothed</th> + <th scope="col">total vaccinations per hundred</th> + <th scope="col">people vaccinated per hundred</th> + <th scope="col">people fully vaccinated per hundred</th> + <th scope="col">new vaccinations smoothed per million</th> + <th scope="col">stringency index</th> + <th scope="col">population</th> + <th scope="col">population density</th> + <th scope="col">median age</th> + <th scope="col">aged 65 older</th> + <th scope="col">aged 70 older</th> + <th scope="col">gdp per capita</th> + <th scope="col">extreme poverty</th> + <th scope="col">cardiovasc death rate</th> + <th scope="col">diabetes prevalence</th> + <th scope="col">female smokers</th> + <th scope="col">male smokers</th> + <th scope="col">handwashing facilities</th> + <th scope="col">hospital beds per thousand</th> + <th scope="col">life expectancy</th> + <th scope="col">human development index</th> + </tr> + -- GitLab