From 79a41b4f0e52384571078c9a32cc0dc4d4c1d688 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 14 Nov 2020 12:09:35 +1100 Subject: [PATCH] split out old books into book and books.html, all *.html now using extends and {% block %} in jinja2. So navbar is now present in all URLs --- templates/author.html | 8 ++--- templates/authors.html | 6 ++-- templates/base.html | 4 +-- templates/book.html | 43 +++++++++++++++++++++++++ templates/books.html | 73 ++---------------------------------------- 5 files changed, 54 insertions(+), 80 deletions(-) create mode 100644 templates/book.html diff --git a/templates/author.html b/templates/author.html index 2c9d953..94485e7 100644 --- a/templates/author.html +++ b/templates/author.html @@ -1,10 +1,9 @@ -{% extends "base.html" %} -{% block main_content %} +{% extends "base.html" %} {% block main_content %}

Author

{% if message|length %} -
+
{{message}}
{% endif %} @@ -20,7 +19,8 @@


- {{ wtf.form_field( author_form.submit, button_map={'submit':'primary'}, horizontal_columns=('xl', 2, 10), class="btn btn-primary offset-xl-1 col-xl-2" )}} + {{ wtf.form_field( author_form.submit, horizontal_columns=('xl', 2, 2), class="btn btn-primary offset-xl-1 col-xl-2" )}} + {{ wtf.form_field( author_form.delete, horizontal_columns=('xl', 2, 2), class="btn btn-danger offset-xl-1 col-xl-2" )}}
diff --git a/templates/authors.html b/templates/authors.html index bb3e727..7c9c6d3 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -4,13 +4,11 @@

Authors

- + {% for author in authors %} - + {% endfor %}
SurnameFirstname(s)Action
SurnameFirstname(s)
{{author.surname}}{{author.firstnames}} - icons for: E, D -
{{author.surname}}{{author.firstnames}}
diff --git a/templates/base.html b/templates/base.html index 5ead55c..09d883f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,13 +24,13 @@