2023-10-23 13:03:35 +13:00
|
|
|
{% if current_user.is_authenticated and current_user.verified %}
|
2023-10-14 21:53:47 +13:00
|
|
|
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}"
|
2023-11-30 06:36:08 +13:00
|
|
|
hx-post="/comment/{{ comment.id }}/upvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons">
|
2023-10-14 21:53:47 +13:00
|
|
|
<span class="fe fe-arrow-up"></span>
|
|
|
|
{{ comment.up_votes }}
|
2023-12-30 14:06:30 +13:00
|
|
|
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
|
2023-10-14 21:53:47 +13:00
|
|
|
</div>
|
|
|
|
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }}"
|
2023-11-30 06:36:08 +13:00
|
|
|
hx-post="/comment/{{ comment.id }}/downvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons">
|
2023-10-14 21:53:47 +13:00
|
|
|
<span class="fe fe-arrow-down"></span>
|
|
|
|
{{ comment.down_votes }}
|
2023-12-30 14:06:30 +13:00
|
|
|
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
|
2023-10-23 13:03:35 +13:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}">
|
|
|
|
<span class="fe fe-arrow-up"></span>
|
|
|
|
{{ comment.up_votes }}
|
|
|
|
</div>
|
|
|
|
<div class="downvote_button digits_{{ digits(comment.down_votes) }} {{ downvoted_class }}">
|
|
|
|
<span class="fe fe-arrow-down"></span>
|
|
|
|
{{ comment.down_votes }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|