2022-12-21 18:40:46 -08:00
|
|
|
{% if post.pk in interactions.like %}
|
|
|
|
<a title="Unlike" class="active" hx-post="{{ post.urls.action_unlike }}" hx-swap="outerHTML" role="menuitem">
|
2022-12-23 21:16:26 -08:00
|
|
|
<i class="fa-solid fa-star"></i>
|
2022-12-31 12:48:35 -08:00
|
|
|
<span class="like-count">{{ post.stats_with_defaults.likes }}</span>
|
2022-12-21 18:40:46 -08:00
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<a title="Like" hx-post="{{ post.urls.action_like }}" hx-swap="outerHTML" role="menuitem">
|
2022-12-23 21:16:26 -08:00
|
|
|
<i class="fa-solid fa-star"></i>
|
2022-12-31 12:48:35 -08:00
|
|
|
<span class="like-count">{{ post.stats_with_defaults.likes }}</span>
|
2022-12-21 18:40:46 -08:00
|
|
|
</a>
|
|
|
|
{% endif %}
|