From e8f3a470ce693bef9303d3dd4c46523cdc691826 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 11 Feb 2025 12:12:37 +0200 Subject: Add structure, introduce progressive enhancement --- browser/templates/aside.html.j2 | 16 ---------------- browser/templates/base.html.j2 | 21 ++++++++++++++++++--- browser/templates/error.html.j2 | 6 ------ browser/templates/form_find.html.j2 | 6 ------ browser/templates/form_range.html.j2 | 8 -------- browser/templates/frag_aside.html.j2 | 14 ++++++++++++++ browser/templates/frag_error.html.j2 | 10 ++++++++++ browser/templates/frag_form_find.html.j2 | 7 +++++++ browser/templates/frag_form_range.html.j2 | 9 +++++++++ browser/templates/index.html.j2 | 28 ---------------------------- browser/templates/page_error.html.j2 | 5 +++++ browser/templates/page_main.html.j2 | 28 ++++++++++++++++++++++++++++ 12 files changed, 91 insertions(+), 67 deletions(-) delete mode 100644 browser/templates/aside.html.j2 delete mode 100644 browser/templates/error.html.j2 delete mode 100644 browser/templates/form_find.html.j2 delete mode 100644 browser/templates/form_range.html.j2 create mode 100644 browser/templates/frag_aside.html.j2 create mode 100644 browser/templates/frag_error.html.j2 create mode 100644 browser/templates/frag_form_find.html.j2 create mode 100644 browser/templates/frag_form_range.html.j2 delete mode 100644 browser/templates/index.html.j2 create mode 100644 browser/templates/page_error.html.j2 create mode 100644 browser/templates/page_main.html.j2 (limited to 'browser/templates') diff --git a/browser/templates/aside.html.j2 b/browser/templates/aside.html.j2 deleted file mode 100644 index eb8c9cf..0000000 --- a/browser/templates/aside.html.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{% block aside %} - -{% endblock %} diff --git a/browser/templates/base.html.j2 b/browser/templates/base.html.j2 index a8a6cf7..8b41a85 100644 --- a/browser/templates/base.html.j2 +++ b/browser/templates/base.html.j2 @@ -9,12 +9,27 @@ Database browser {% endblock %} - - -

Database browser

{% block content %}{% endblock %} + + + + + diff --git a/browser/templates/error.html.j2 b/browser/templates/error.html.j2 deleted file mode 100644 index 2d0dc19..0000000 --- a/browser/templates/error.html.j2 +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "base.html.j2" %} - -{% block content %} -

Error

-{{ error }} -{% endblock %} diff --git a/browser/templates/form_find.html.j2 b/browser/templates/form_find.html.j2 deleted file mode 100644 index 54608b6..0000000 --- a/browser/templates/form_find.html.j2 +++ /dev/null @@ -1,6 +0,0 @@ -
- - - - - diff --git a/browser/templates/form_range.html.j2 b/browser/templates/form_range.html.j2 deleted file mode 100644 index 76eb4d2..0000000 --- a/browser/templates/form_range.html.j2 +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/browser/templates/frag_aside.html.j2 b/browser/templates/frag_aside.html.j2 new file mode 100644 index 0000000..8366436 --- /dev/null +++ b/browser/templates/frag_aside.html.j2 @@ -0,0 +1,14 @@ + diff --git a/browser/templates/frag_error.html.j2 b/browser/templates/frag_error.html.j2 new file mode 100644 index 0000000..f014f0a --- /dev/null +++ b/browser/templates/frag_error.html.j2 @@ -0,0 +1,10 @@ +{% if container %} +<{{ container }}> +{% endif %} + +

Error

+{{ error }} + +{% if container %} + +{% endif %} diff --git a/browser/templates/frag_form_find.html.j2 b/browser/templates/frag_form_find.html.j2 new file mode 100644 index 0000000..a8fe493 --- /dev/null +++ b/browser/templates/frag_form_find.html.j2 @@ -0,0 +1,7 @@ + + + + + + +
diff --git a/browser/templates/frag_form_range.html.j2 b/browser/templates/frag_form_range.html.j2 new file mode 100644 index 0000000..b343b6d --- /dev/null +++ b/browser/templates/frag_form_range.html.j2 @@ -0,0 +1,9 @@ +
+ + + + + + + +
diff --git a/browser/templates/index.html.j2 b/browser/templates/index.html.j2 deleted file mode 100644 index 9713944..0000000 --- a/browser/templates/index.html.j2 +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html.j2" %} - -{% block content %} -
- {% include "aside.html.j2" %} - -
- - - - {% for field_name in field_names %} - - {% endfor %} - - - - {% for row in rows %} - - {% for field in row %} - - {% endfor %} - - {% endfor %} - -
{{ field_name }}
{{ field }}
-
-
-{% endblock %} diff --git a/browser/templates/page_error.html.j2 b/browser/templates/page_error.html.j2 new file mode 100644 index 0000000..3233283 --- /dev/null +++ b/browser/templates/page_error.html.j2 @@ -0,0 +1,5 @@ +{% extends "base.html.j2" %} + +{% block content %} +{% include "frag_error.html.j2" %} +{% endblock %} diff --git a/browser/templates/page_main.html.j2 b/browser/templates/page_main.html.j2 new file mode 100644 index 0000000..8ce4a13 --- /dev/null +++ b/browser/templates/page_main.html.j2 @@ -0,0 +1,28 @@ +{% extends "base.html.j2" %} + +{% block content %} +
+ {% include "frag_aside.html.j2" %} + +
+ + + + {% for field_name in field_names %} + + {% endfor %} + + + + {% for row in rows %} + + {% for field in row %} + + {% endfor %} + + {% endfor %} + +
{{ field_name }}
{{ field }}
+
+
+{% endblock %} -- cgit v1.3