{% load i18n %}
{% load user_actions %}
{% boosted_post post as boosted %}
<span hx-target="this"
      hx-swap="outerHTML"
      {% if not request.user.is_authenticated %}hx-disable{% endif %}>
  <a hx-post="{% url 'journal:post_boost' post.pk %}"
     hx-include="[name='post_url']"
     {% if boosted %}class="activated"{% endif %}
     title="{% trans "boost" %}">
    <input type="hidden" name="post_url" value="{{ post.object_uri }}">
    <i class="fa-solid fa-retweet"></i>
    {% if post.stats.boosts > 1 %}<span>{{ post.stats.boosts }}</span>{% endif %}
  </a>
</span>
