voting button ajax spinner - css tweak

This commit is contained in:
rimu 2023-12-30 14:06:30 +13:00
parent 68e1bb26df
commit ed13e2d03d
4 changed files with 6 additions and 4 deletions

View file

@ -593,6 +593,7 @@ fieldset legend {
height: 20px;
right: 14px;
top: 5px;
opacity: 1 !important;
}
.voting_buttons .htmx-request.htmx-indicator {
display: inline;

View file

@ -299,6 +299,7 @@ nav, etc which are used site-wide */
height: 20px;
right: 14px;
top: 5px;
opacity: 1!important;
}
.htmx-request.htmx-indicator{
display:inline;

View file

@ -3,13 +3,13 @@
hx-post="/post/{{ post.id }}/upvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons">
<span class="fe fe-arrow-up"></span>
{{ post.up_votes }}
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="">
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
</div>
<div class="downvote_button digits_{{ digits(post.down_votes) }} {{ downvoted_class }}"
hx-post="/post/{{ post.id }}/downvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons">
<span class="fe fe-arrow-down"></span>
{{ post.down_votes }}
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="">
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
</div>
{% else %}
<div class="upvote_button digits_{{ digits(post.up_votes) }} {{ upvoted_class }}">

View file

@ -3,13 +3,13 @@
hx-post="/comment/{{ comment.id }}/upvote" hx-trigger="click throttle:1s" hx-target="closest .voting_buttons">
<span class="fe fe-arrow-up"></span>
{{ comment.up_votes }}
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="">
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
</div>
<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">
<span class="fe fe-arrow-down"></span>
{{ comment.down_votes }}
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="">
<img class="htmx-indicator" src="/static/images/spinner.svg" alt="" style="opacity: 0;">
</div>
{% else %}
<div class="upvote_button digits_{{ digits(comment.up_votes) }} {{ upvoted_class }}">