aboutsummaryrefslogtreecommitdiffstats
path: root/templates/index.html.j2
diff options
context:
space:
mode:
authorJan T <jan@jantuomi.fi>2024-02-28 17:32:01 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-12-21 19:43:13 +0200
commitb6bc5c5794b4df182175da34e6b08298084c0324 (patch)
tree501362805ac744eb71e0e9d7b70addb9f0c9ae99 /templates/index.html.j2
Initial commit
Diffstat (limited to 'templates/index.html.j2')
-rw-r--r--templates/index.html.j240
1 files changed, 40 insertions, 0 deletions
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 %}
+<h2>Create new diddle</h2>
+<form class="poll-form" action="/poll/create" method="post">
+ <table>
+ <tbody>
+ <tr>
+ <td><label for="title">Title</label></td>
+ <td><input type="text" name="title" required></td>
+ </tr>
+ <tr>
+ <td><label for="description">Description (optional)</label></td>
+ <td><textarea name="description"></textarea></td>
+ </tr>
+ <tr>
+ <td><label for="author_name">Your name</label></td>
+ <td><input type="text" name="author_name" required></td>
+ </tr>
+ <tr>
+ <td><label for="author_email">Your email (optional)</label></td>
+ <td><input type="text" name="author_email"></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>You can add options after submitting.</p>
+ <input class="green" type="submit" value="Create">
+</form>
+
+{% if created_polls | length != 0 %}
+<h3>My diddles</h3>
+<ul>
+ {% for poll in created_polls %}
+ <li><a href="/manage/{{ poll.manage_code }}">{{ poll.title }}</a></li>
+ {% endfor %}
+</ul>
+{% endif %}
+
+{% endblock %}