423 B · text History 263b40b
<button hx-post="/p/{{ post.id }}/bookmark" hx-target="this" hx-select="unset" hx-swap="outerHTML" type="button"
        class="btn btn-ghost btn-xs" aria-label="Toggle bookmark"
        title="{% if post.bookmarked %}Remove bookmark{% else %}Bookmark{% endif %}">
  <i class="fa{% if post.bookmarked %}s{% else %}r{% endif %} fa-bookmark {% if post.bookmarked %}text-warning{% else %}opacity-50{% endif %}"></i>
</button>