mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
25 lines
1.5 KiB
HTML
25 lines
1.5 KiB
HTML
{% if current_user.is_authenticated and current_user.verified %}
|
|
{% if can_upvote(current_user, community) %}
|
|
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}"
|
|
hx-post="/comment/{{ comment.id }}/upvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons_new">
|
|
<span class="fe fe-arrow-up"></span>
|
|
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
|
|
</div>
|
|
{% endif %}
|
|
<span title="{{ comment.up_votes }}, {{ comment.down_votes }}">{{ comment.up_votes - comment.down_votes }}</span>
|
|
{% if can_downvote(current_user, community) %}
|
|
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }}"
|
|
hx-post="/comment/{{ comment.id }}/downvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons_new">
|
|
<span class="fe fe-arrow-down"></span>
|
|
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}">
|
|
<span class="fe fe-arrow-up"></span>
|
|
</div>
|
|
{{ comment.up_votes - comment.down_votes }}
|
|
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }}">
|
|
<span class="fe fe-arrow-down"></span>
|
|
</div>
|
|
{% endif %}
|