moviewyrm/bookwyrm/templates/snippets/fav_button.html

20 lines
987 B
HTML
Raw Normal View History

2020-12-13 02:25:04 +00:00
{% load bookwyrm_tags %}
2020-11-08 02:59:38 +00:00
{% with status.id|uuid as uuid %}
<form name="favorite" action="/favorite/{{ status.id }}" method="POST" class="interaction fav-{{ status.id }}-{{ uuid }} {% if request.user|liked:status %}hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
{% csrf_token %}
<button class="button is-small" type="submit">
2021-01-14 22:13:23 +00:00
<span class="icon icon-heart" title="Like status">
<span class="is-sr-only">Like status</span>
</span>
</button>
</form>
<form name="unfavorite" action="/unfavorite/{{ status.id }}" method="POST" class="interaction fav-{{ status.id }}-{{ uuid }} active {% if not request.user|liked:status %}hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
{% csrf_token %}
<button class="button is-primary is-small" type="submit">
2021-01-14 22:13:23 +00:00
<span class="icon icon-heart" title="Un-like status">
<span class="is-sr-only">Un-like status</span>
</span>
</button>
</form>
{% endwith %}