513 B · text History b1da290
<div id="reactions-{{ post.id }}" class="flex flex-wrap items-center gap-1 mt-2">
  {% for r in post.reactions %}
  <button hx-post="/p/{{ post.id }}/react/{{ r.key }}" hx-target="#reactions-{{ post.id }}" hx-select="unset" hx-swap="outerHTML"
          type="button" class="btn btn-xs {% if r.reacted %}btn-primary{% else %}btn-ghost{% endif %}" title="{{ r.key }}">
    <span>{{ r.emoji }}</span>{% if r.count > 0 %}<span class="ml-1 font-mono">{{ r.count }}</span>{% endif %}
  </button>
  {% endfor %}
</div>