initial working state
This commit is contained in:
4
templates/blank.html
Normal file
4
templates/blank.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{{ message }}
|
||||
{% endblock %}
|
||||
8
templates/index.html
Normal file
8
templates/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<h1>aBot!</h1>
|
||||
|
||||
<div class=index>Anonymous voting engine</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
12
templates/layout.html
Normal file
12
templates/layout.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<title>aBot</title>
|
||||
<meta name="viewport" content="width=440" />
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
||||
<script src="{{ url_for('static', filename='script.js') }}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class=page>
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
9
templates/preview.html
Normal file
9
templates/preview.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<div id="preview_header">
|
||||
Preview for: {{ key|safe }}<br>
|
||||
Expires: {{ valid_for }}<br>
|
||||
</div>
|
||||
|
||||
{% include "questions.html" %}
|
||||
{% endblock %}
|
||||
25
templates/questions.html
Normal file
25
templates/questions.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div id="questions">
|
||||
{% for question in form.questions %}
|
||||
<div class = "question">
|
||||
<h2>{{ question.name|safe }}</h2>
|
||||
|
||||
{% for choice in question.choices %}
|
||||
<div>
|
||||
<input type="radio" name="QC{{ question.index }}" value="{{ choice|safe }}" />
|
||||
<label>{{ choice|safe }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for choice in question.multichoices %}
|
||||
<div>
|
||||
<input type="checkbox" name="QM{{ question.index }}" value="{{ choice|safe }}" />
|
||||
<label>{{ choice|safe }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if question.open_question %}
|
||||
<div>
|
||||
<textarea name="QO{{ question.index }}" rows="5"></textarea>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
8
templates/thank_you.html
Normal file
8
templates/thank_you.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<h1>aBot!</h1>
|
||||
|
||||
Thank you for the vote!
|
||||
|
||||
|
||||
{% endblock %}
|
||||
14
templates/vote.html
Normal file
14
templates/vote.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<div id="vote_header">Voting ends at: {{ valid_for }}</div>
|
||||
<form id="vote_form" action="{{ url_for('save_vote') }}" method=post >
|
||||
<input type=hidden value="{{ key|safe }}" name=key />
|
||||
<input type=hidden value="{{ token|safe }}" name=token />
|
||||
|
||||
{% include "questions.html" %}
|
||||
<p>
|
||||
<input type=submit name=submit /><br>
|
||||
<span class = "warning">Votes can not be edited later!</span>
|
||||
</p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user