summaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html20
1 files changed, 15 insertions, 5 deletions
diff --git a/templates/index.html b/templates/index.html
index ca8f25b..08d89be 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -13,14 +13,14 @@
<h1>Lehrersprüche</h1>
<div class="divider"></div>
{% for joke in jokes %}
- <div class="section row valign-wrapper">
+ <div class="row section valign-wrapper">
<form class="col s2 row" action="vote" method="post">
<input type="hidden" name="id" value="{{ joke.id }}">
<button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="upvote"><i class="material-icons">thumb_up</i> {{ joke.upvotes }}</button>
<button class="btn{% if joke.reports>0 %}-flat{% endif %} col s12" type="submit" name="vote" value="downvote"><i class="material-icons">thumb_down</i> {{ joke.downvotes }}</button>
</form>
- <div class="col s8 {% if joke.reports>0 %}grey-text{% endif %}">
- <p>{{ joke.text|safe }}</p>
+ <div class="valign col s8 {% if joke.reports>0 %}grey-text{% endif %}">
+ {{ joke.text|safe }}
</div>
<form class="col s2" action="report" method="post">
<input type="hidden" name="id" value="{{ joke.id }}">
@@ -32,8 +32,18 @@
</div>
<div class="divider"></div>
{% endfor %}
- <div class="section row">
- <form class="col s12" action="submit" method="post">
+ <div class="section center">
+ <ul class="pagination">
+ <li{% if currentpage==0 %} class="disabled"{% endif %}><a href="/page/{{ currentpage-1 }}"><i class="material-icons">chevron_left</i></a></li>
+ {% for page in pages %}
+ <li{% if currentpage==loop.index0 %} class="active"{% endif %}><a href="/page/{{ loop.index0 }}">{{ loop.index }}</a></li>
+ {% endfor %}
+ <li{% if currentpage==loop.length-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}"><i class="material-icons">chevron_right</i></a></li>
+ </ul>
+ </div>
+ <div class="divider"></div>
+ <div class="section">
+ <form action="submit" method="post">
<div class="row valign-wrapper">
<div class="col s8 input-field">
<label for="text">Neuen Spruch hinzufügen</label>