main features
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
{# expects: profile_id, liked: bool #}
|
||||
<form method="post"
|
||||
hx-post="{% url 'like_profile' profile_id %}"
|
||||
hx-target="this"
|
||||
hx-swap="outerHTML"
|
||||
aria-label="Добавить в избранное">
|
||||
{% csrf_token %}
|
||||
{% if liked %}
|
||||
<button type="submit" class="inline-flex items-center gap-1 rounded-md border px-3 py-1.5 text-sm hover:bg-white">
|
||||
<span aria-hidden="true">❤️</span> В избранном
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="submit" class="inline-flex items-center gap-1 rounded-md border px-3 py-1.5 text-sm hover:bg-white">
|
||||
<span aria-hidden="true">🤍</span> В избранное
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if liked %}
|
||||
<button class="btn" type="submit">★ В избранном</button>
|
||||
{% else %}
|
||||
<button class="btn" type="submit">☆ В избранное</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
<a href="/login/?next={{ request.path }}" class="inline-flex items-center gap-1 rounded-md bg-indigo-600 text-white px-3 py-1.5 text-sm hover:bg-indigo-700">
|
||||
Войти, чтобы добавить
|
||||
</a>
|
||||
<button class="btn" disabled>☆ В избранное (войдите)</button>
|
||||
|
||||
Reference in New Issue
Block a user