From ef72b74ec34e95a38890d542cda298dd6565d5ad Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 2 May 2025 16:37:29 +0300 Subject: Start replacing browser with a chat demo --- demo/templates/base.html.j2 | 19 +++++++++++++++++++ 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_results.html.j2 | 18 ++++++++++++++++++ demo/templates/page_error.html.j2 | 5 +++++ demo/templates/page_main.html.j2 | 11 +++++++++++ 11 files changed, 145 insertions(+) create mode 100644 demo/templates/base.html.j2 create mode 100644 demo/templates/frag_aside.html.j2 create mode 100644 demo/templates/frag_aside_link.html.j2 create mode 100644 demo/templates/frag_error.html.j2 create mode 100644 demo/templates/frag_form_delete.html.j2 create mode 100644 demo/templates/frag_form_find.html.j2 create mode 100644 demo/templates/frag_form_range.html.j2 create mode 100644 demo/templates/frag_form_upsert.html.j2 create mode 100644 demo/templates/frag_results.html.j2 create mode 100644 demo/templates/page_error.html.j2 create 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 new file mode 100644 index 0000000..47b3f6c --- /dev/null +++ b/demo/templates/base.html.j2 @@ -0,0 +1,19 @@ + + + + + + + + {% block head_meta %} + Database browser + + {% endblock %} + + +

Database browser

+ {% block content %}{% endblock %} + + + + diff --git a/demo/templates/frag_aside.html.j2 b/demo/templates/frag_aside.html.j2 new file mode 100644 index 0000000..6c5658f --- /dev/null +++ b/demo/templates/frag_aside.html.j2 @@ -0,0 +1,27 @@ +{# +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 new file mode 100644 index 0000000..9cd6041 --- /dev/null +++ b/demo/templates/frag_aside_link.html.j2 @@ -0,0 +1,9 @@ +{# +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 new file mode 100644 index 0000000..c5034cd --- /dev/null +++ b/demo/templates/frag_error.html.j2 @@ -0,0 +1,16 @@ +{# +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 new file mode 100644 index 0000000..22306c1 --- /dev/null +++ b/demo/templates/frag_form_delete.html.j2 @@ -0,0 +1,7 @@ +
+ + + + + +
diff --git a/demo/templates/frag_form_find.html.j2 b/demo/templates/frag_form_find.html.j2 new file mode 100644 index 0000000..cadd44b --- /dev/null +++ b/demo/templates/frag_form_find.html.j2 @@ -0,0 +1,7 @@ +
+ + + + + +
diff --git a/demo/templates/frag_form_range.html.j2 b/demo/templates/frag_form_range.html.j2 new file mode 100644 index 0000000..84b8024 --- /dev/null +++ b/demo/templates/frag_form_range.html.j2 @@ -0,0 +1,21 @@ +
+ + + + + + + + + + + +
diff --git a/demo/templates/frag_form_upsert.html.j2 b/demo/templates/frag_form_upsert.html.j2 new file mode 100644 index 0000000..68820f5 --- /dev/null +++ b/demo/templates/frag_form_upsert.html.j2 @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/demo/templates/frag_results.html.j2 b/demo/templates/frag_results.html.j2 new file mode 100644 index 0000000..bfb54e9 --- /dev/null +++ b/demo/templates/frag_results.html.j2 @@ -0,0 +1,18 @@ + + + + {% 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 new file mode 100644 index 0000000..3233283 --- /dev/null +++ b/demo/templates/page_error.html.j2 @@ -0,0 +1,5 @@ +{% extends "base.html.j2" %} + +{% block content %} +{% include "frag_error.html.j2" %} +{% endblock %} diff --git a/demo/templates/page_main.html.j2 b/demo/templates/page_main.html.j2 new file mode 100644 index 0000000..907275f --- /dev/null +++ b/demo/templates/page_main.html.j2 @@ -0,0 +1,11 @@ +{% extends "base.html.j2" %} + +{% block content %} +
+ {% include "frag_aside.html.j2" %} + +
+ {% include "frag_results.html.j2" %} +
+
+{% endblock %} -- cgit v1.3