takahe/templates/activities/_like.html
2022-12-22 21:28:28 +00:00

11 lines
469 B
HTML

<span class="post-action">
{% if post.pk in interactions.like %}
<a title="Unlike" class="active" hx-post="{{ post.urls.action_unlike }}" hx-swap="outerHTML" role="menuitem">
<i class="fa-solid fa-star"></i> {{ event.like_count }}
</a>
{% else %}
<a title="Like" hx-post="{{ post.urls.action_like }}" hx-swap="outerHTML" role="menuitem">
<i class="fa-solid fa-star"></i> {{ event.like_count }}
</a>
{% endif %}
</span>