From e17048eddfe2df86abd2d498da2a33b9c3dd8a72 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 2 May 2025 23:38:23 +0300 Subject: Add sort_asc param, impl demo chat app --- demo/templates/base.html.j2 | 17 ++++++++++++++--- demo/templates/frag_aside.html.j2 | 27 --------------------------- demo/templates/frag_aside_link.html.j2 | 9 --------- demo/templates/frag_error.html.j2 | 16 ---------------- demo/templates/frag_form_delete.html.j2 | 7 ------- demo/templates/frag_form_find.html.j2 | 7 ------- demo/templates/frag_form_range.html.j2 | 21 --------------------- demo/templates/frag_form_upsert.html.j2 | 5 ----- demo/templates/frag_messages.html.j2 | 12 ++++++++++++ demo/templates/frag_results.html.j2 | 18 ------------------ demo/templates/page_error.html.j2 | 9 ++++++++- demo/templates/page_index.html.j2 | 27 +++++++++++++++++++++++++++ demo/templates/page_main.html.j2 | 11 ----------- 13 files changed, 61 insertions(+), 125 deletions(-) delete mode 100644 demo/templates/frag_aside.html.j2 delete mode 100644 demo/templates/frag_aside_link.html.j2 delete mode 100644 demo/templates/frag_error.html.j2 delete mode 100644 demo/templates/frag_form_delete.html.j2 delete mode 100644 demo/templates/frag_form_find.html.j2 delete mode 100644 demo/templates/frag_form_range.html.j2 delete mode 100644 demo/templates/frag_form_upsert.html.j2 create mode 100644 demo/templates/frag_messages.html.j2 delete mode 100644 demo/templates/frag_results.html.j2 create mode 100644 demo/templates/page_index.html.j2 delete mode 100644 demo/templates/page_main.html.j2 (limited to 'demo/templates') diff --git a/demo/templates/base.html.j2 b/demo/templates/base.html.j2 index 47b3f6c..06ab5fc 100644 --- a/demo/templates/base.html.j2 +++ b/demo/templates/base.html.j2 @@ -6,14 +6,25 @@ {% block head_meta %} - Database browser - + Demo chat app + {% endblock %} -

Database browser

+

Demo chat app

{% block content %}{% endblock %} + + + diff --git a/demo/templates/frag_aside.html.j2 b/demo/templates/frag_aside.html.j2 deleted file mode 100644 index 6c5658f..0000000 --- a/demo/templates/frag_aside.html.j2 +++ /dev/null @@ -1,27 +0,0 @@ -{# -Params - selected_form Form fragment to include -#} - - diff --git a/demo/templates/frag_aside_link.html.j2 b/demo/templates/frag_aside_link.html.j2 deleted file mode 100644 index 9cd6041..0000000 --- a/demo/templates/frag_aside_link.html.j2 +++ /dev/null @@ -1,9 +0,0 @@ -{# -Params - text Text to render in the link - href URL to link to -#} - -
- -
diff --git a/demo/templates/frag_error.html.j2 b/demo/templates/frag_error.html.j2 deleted file mode 100644 index c5034cd..0000000 --- a/demo/templates/frag_error.html.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{# -Params - error Error message to display - container (optional) id for a div to wrap the error message in -#} - -{% if container %} -
-{% endif %} - -

Error

-{{ error }} - -{% if container %} -
-{% endif %} diff --git a/demo/templates/frag_form_delete.html.j2 b/demo/templates/frag_form_delete.html.j2 deleted file mode 100644 index 22306c1..0000000 --- a/demo/templates/frag_form_delete.html.j2 +++ /dev/null @@ -1,7 +0,0 @@ -
- - - - - -
diff --git a/demo/templates/frag_form_find.html.j2 b/demo/templates/frag_form_find.html.j2 deleted file mode 100644 index cadd44b..0000000 --- a/demo/templates/frag_form_find.html.j2 +++ /dev/null @@ -1,7 +0,0 @@ -
- - - - - -
diff --git a/demo/templates/frag_form_range.html.j2 b/demo/templates/frag_form_range.html.j2 deleted file mode 100644 index 84b8024..0000000 --- a/demo/templates/frag_form_range.html.j2 +++ /dev/null @@ -1,21 +0,0 @@ -
- - - - - - - - - - - -
diff --git a/demo/templates/frag_form_upsert.html.j2 b/demo/templates/frag_form_upsert.html.j2 deleted file mode 100644 index 68820f5..0000000 --- a/demo/templates/frag_form_upsert.html.j2 +++ /dev/null @@ -1,5 +0,0 @@ -
- - - -
diff --git a/demo/templates/frag_messages.html.j2 b/demo/templates/frag_messages.html.j2 new file mode 100644 index 0000000..0473d16 --- /dev/null +++ b/demo/templates/frag_messages.html.j2 @@ -0,0 +1,12 @@ +{# +Params + messages List of message objects to display +#} + +
+ {% for m in messages %} +
+ {{ m.ts }} {{ m.username }}: {{ m.msg }} +
+ {% endfor %} +
diff --git a/demo/templates/frag_results.html.j2 b/demo/templates/frag_results.html.j2 deleted file mode 100644 index bfb54e9..0000000 --- a/demo/templates/frag_results.html.j2 +++ /dev/null @@ -1,18 +0,0 @@ - - - - {% for field_name in field_names %} - - {% endfor %} - - - - {% for row in rows %} - - {% for field in row %} - - {% endfor %} - - {% endfor %} - -
{{ field_name }}
{{ field }}
diff --git a/demo/templates/page_error.html.j2 b/demo/templates/page_error.html.j2 index 3233283..a3f260e 100644 --- a/demo/templates/page_error.html.j2 +++ b/demo/templates/page_error.html.j2 @@ -1,5 +1,12 @@ {% extends "base.html.j2" %} {% block content %} -{% include "frag_error.html.j2" %} +
+

Error

+

An error occurred while processing your request.

+ +
+{{ error }}
+
+
{% endblock %} diff --git a/demo/templates/page_index.html.j2 b/demo/templates/page_index.html.j2 new file mode 100644 index 0000000..2da14ab --- /dev/null +++ b/demo/templates/page_index.html.j2 @@ -0,0 +1,27 @@ +{% extends "base.html.j2" %} + +{% block content %} +
+

Messages

+ {% include "frag_messages.html.j2" %} + +
+ + + +
+ + +
+{% endblock %} diff --git a/demo/templates/page_main.html.j2 b/demo/templates/page_main.html.j2 deleted file mode 100644 index 907275f..0000000 --- a/demo/templates/page_main.html.j2 +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html.j2" %} - -{% block content %} -
- {% include "frag_aside.html.j2" %} - -
- {% include "frag_results.html.j2" %} -
-
-{% endblock %} -- cgit v1.3