diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-09-11 15:12:19 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-09-11 15:12:19 +0200 |
| commit | 9a983203c4c22f6e6494f7596433e6c857f9a591 (patch) | |
| tree | ac7e3906412d3470ed92642a25a9aa2aa61a151e /templates/index.html | |
| parent | f1892179491d68ad0b72913bc7c1b682e81afa2a (diff) | |
| download | jokevote-9a983203c4c22f6e6494f7596433e6c857f9a591.tar.gz jokevote-9a983203c4c22f6e6494f7596433e6c857f9a591.zip | |
do not count a user's own votes; prevents jumping jokes
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/templates/index.html b/templates/index.html index d176cdc..b884c57 100644 --- a/templates/index.html +++ b/templates/index.html @@ -112,8 +112,19 @@ <li class="collection-item row valign-wrapper"> <div class="col s4 m2 valign"> {% if not joke.deleted %} - <div> - <i class="material-icons">whatshot</i> <span class="right">{{ joke.score }} Punkte</span> + <div class="center"> + <i class="material-icons">whatshot</i> + <span>{{ joke.score }}</span> + {% if joke.downvoted %} + <small class="red-text"> + {% if user.loggedin %}-10{% else %}-1{% endif %} + </small> + {% endif %} + {% if joke.upvoted %} + <small class="green-text"> + {% if user.loggedin %}+10{% else %}+1{% endif %} + </small> + {% endif %} </div> <form action="/upvote{{ query() }}" method="post"> <input type="hidden" name="id" value="{{ joke.id }}"> |
