772 B · text History 0c6677d
<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="group/react btn btn-xs {% if r.reacted %}btn-primary{% else %}btn-ghost{% endif %}" title="{{ r.key }}">
    {# Emoji stay monochrome until hovered or focused. #}
    <span class="grayscale opacity-70 transition duration-150 group-hover/react:grayscale-0 group-hover/react:opacity-100 group-focus-visible/react:grayscale-0 group-focus-visible/react:opacity-100">{{ r.emoji }}</span>{% if r.count > 0 %}<span class="ml-1 font-mono">{{ r.count }}</span>{% endif %}
  </button>
  {% endfor %}
</div>