<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 are tinted with the theme primary until hovered or focused (.emoji-tint,
style.css); your own reactions sit on btn-primary, so they keep full colour. #}
<span class="{% if not r.reacted %}emoji-tint{% endif %}">{{ r.emoji }}</span>{% if r.count > 0 %}<span class="ml-1 font-mono">{{ r.count }}</span>{% endif %}
</button>
{% endfor %}
</div>
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
750 B · text
History
263b40b