From b6bc5c5794b4df182175da34e6b08298084c0324 Mon Sep 17 00:00:00 2001 From: Jan T Date: Wed, 28 Feb 2024 17:32:01 +0200 Subject: Initial commit --- templates/base.html.j2 | 13 ++++ templates/error.html.j2 | 6 ++ templates/index.html.j2 | 40 ++++++++++++ templates/manage.html.j2 | 119 ++++++++++++++++++++++++++++++++++ templates/poll.html.j2 | 34 ++++++++++ templates/poll_confirm_delete.html.j2 | 13 ++++ templates/poll_vote_list.html.j2 | 34 ++++++++++ templates/poll_vote_table.html.j2 | 51 +++++++++++++++ 8 files changed, 310 insertions(+) create mode 100644 templates/base.html.j2 create mode 100644 templates/error.html.j2 create mode 100644 templates/index.html.j2 create mode 100644 templates/manage.html.j2 create mode 100644 templates/poll.html.j2 create mode 100644 templates/poll_confirm_delete.html.j2 create mode 100644 templates/poll_vote_list.html.j2 create mode 100644 templates/poll_vote_table.html.j2 (limited to 'templates') diff --git a/templates/base.html.j2 b/templates/base.html.j2 new file mode 100644 index 0000000..066c39e --- /dev/null +++ b/templates/base.html.j2 @@ -0,0 +1,13 @@ + + + + diddle 👉👈 + + + + + +

diddle 👉👈

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

Error

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

Create new diddle

+
+ + + + + + + + + + + + + + + + + + + +
+ +

You can add options after submitting.

+ +
+ +{% if created_polls | length != 0 %} +

My diddles

+ +{% endif %} + +{% endblock %} diff --git a/templates/manage.html.j2 b/templates/manage.html.j2 new file mode 100644 index 0000000..82f67ea --- /dev/null +++ b/templates/manage.html.j2 @@ -0,0 +1,119 @@ +{% extends "base.html.j2" %} + +{% block content %} + +

Managing poll {{ poll.title }} by {{ poll.author_name }}

+ +

+ Share this URL with your peers:
+ {{ poll.share_url() }} +

+

+ Note! You can only edit this poll if you have this URL or use the same browser session:
+ {{ poll.manage_url() }} +

+ +
+ + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+

Options

+
+ + + + + + + + + + + {% for choice in poll.choices %} + + + + + + + + {% endfor %} + + + + + + + + +
Start timeEnd time
+ + + + + +
+ + + + + +
+ +
+

Danger zone

+
+ + + +
+
+ + + +{% endblock %} \ No newline at end of file diff --git a/templates/poll.html.j2 b/templates/poll.html.j2 new file mode 100644 index 0000000..e0ede1f --- /dev/null +++ b/templates/poll.html.j2 @@ -0,0 +1,34 @@ +{% extends "base.html.j2" %} + +{% block content %} + +

{{ poll.title }} by {{ poll.author_name }}

+{% if poll.description %} +

{{ poll.description }}

+{% endif %} + +{% if poll.choices | length == 0 %} +

No options available.

+{% else %} + +
+
+ + +
+
+ +
+ {% if display_mode == "table" %} + {% include "poll_vote_table.html.j2" %} + {% else %} + {% include "poll_vote_list.html.j2" %} + {% endif %} +
+{% endif %} + + +{% endblock %} diff --git a/templates/poll_confirm_delete.html.j2 b/templates/poll_confirm_delete.html.j2 new file mode 100644 index 0000000..3a6bc83 --- /dev/null +++ b/templates/poll_confirm_delete.html.j2 @@ -0,0 +1,13 @@ +{% extends "base.html.j2" %} + +{% block content %} +

Confirm deletion of {{ poll.title }}

+ +

Are you sure you want to delete {{ poll.title }}?

+ +
+ + + +
+{% endblock %} diff --git a/templates/poll_vote_list.html.j2 b/templates/poll_vote_list.html.j2 new file mode 100644 index 0000000..37b9406 --- /dev/null +++ b/templates/poll_vote_list.html.j2 @@ -0,0 +1,34 @@ +
+ {% for choice in choices %} +
+