freepost codebase git repo
Clone
HTTPS:
git clone https://vervis.peers.community/repos/Avlxv
SSH:
git clone USERNAME@vervis.peers.community:Avlxv
Branches
Tags
vote.twig
{# Template for up/down vote arrows.
# This template expects these inputs
#
# - target: ('post', 'comment')
# - hash_id: the post/comment hashId
# - vote: (optional) the vote already cast by current logged in user
# - vote_count: the sum of votes for this post/comment
# - user: reference to logged in user
#}
<span class="vote">
{% if user %}
<a href="vote?up&{{ target }}={{ hash_id }}" target="vote_sink" class="{{ vote is defined and vote == 1 ? 'upvoted' }}" onclick="vote ('up', this.parentNode)">
<img title="bump" alt="bump" src="images/upvote.png" />
</a>
{# Show number of votes #}
<span class="count">{{ vote_count }}</span>
<a href="vote?down&{{ target }}={{ hash_id }}" target="vote_sink" class="{{ vote is defined and vote == -1 ? 'downvoted' }}" onclick="vote ('down', this.parentNode)">
<img title="sink" alt="sink" src="images/downvote.png" />
</a>
{% else %}
{{ vote_count ~ ' vote' ~ (vote_count != 1 ? 's') }}
{% endif %}
</span>