2026-06-06 14:31:42 +00:00
{% set _counts = (_reactions or {}).get('counts', {}) %}
{% set _mine = (_reactions or {}).get('mine', []) %}
{% if user or _counts %}
2026-06-19 08:06:09 +00:00
< div class = "reaction-bar" data-reaction-type = "{{ _type }}" data-reaction-uid = "{{ _uid }}" role = "group" aria-label = "Reactions" >
2026-06-06 14:31:42 +00:00
< div class = "reaction-list" >
{% for emoji in REACTION_EMOJI %}
2026-06-19 08:06:09 +00:00
< button type = "button" class = "reaction-chip{% if emoji in _mine %} reacted{% endif %}" data-reaction-emoji = "{{ emoji }}" aria-label = "React with {{ emoji }}" aria-pressed = "{% if emoji in _mine %}true{% else %}false{% endif %}" {% if not _counts . get ( emoji ) and emoji not in _mine %} hidden {% endif %}{{ guest_disabled ( user ) }} >
2026-06-06 14:31:42 +00:00
< span class = "reaction-emoji" > {{ emoji }}</ span >
< span class = "reaction-count" > {{ _counts.get(emoji, 0) }}</ span >
</ button >
{% endfor %}
</ div >
< div class = "reaction-add" >
2026-06-19 08:06:09 +00:00
< button type = "button" class = "reaction-add-btn" aria-label = "Add reaction" title = "Add reaction" aria-expanded = "false" {{ guest_disabled ( user ) }} >< span class = "reaction-add-icon" > 🙂 </ span >< span class = "reaction-add-label" > React</ span ></ button >
2026-06-08 15:38:33 +00:00
{% if user %}
2026-06-06 14:31:42 +00:00
< div class = "reaction-palette" hidden >
{% for emoji in REACTION_EMOJI %}
2026-06-19 08:06:09 +00:00
< button type = "button" class = "reaction-palette-btn" data-reaction-emoji = "{{ emoji }}" aria-label = "React with {{ emoji }}" > {{ emoji }}</ button >
2026-06-06 14:31:42 +00:00
{% endfor %}
</ div >
2026-06-08 15:38:33 +00:00
{% endif %}
2026-06-06 14:31:42 +00:00
</ div >
</ div >
{% endif %}