Files
marriage_frontend/templates/ui/components/profile_card.html
2025-08-10 15:31:47 +09:00

28 lines
1.5 KiB
HTML

{# expects: profile, liked_ids (optional) #}
{% with liked = (profile.liked|default_if_none:False) or (liked_ids and profile.id in liked_ids) %}
<article class="rounded-xl bg-white/80 backdrop-blur border shadow-sm hover:shadow transition overflow-hidden flex flex-col">
<img src="{{ profile.photo }}" alt="Фото {{ profile.name }}" class="w-full h-56 object-cover">
<div class="p-4 flex-1 flex flex-col">
<div class="flex items-center justify-between gap-2">
<h3 class="text-lg font-semibold">{{ profile.name }}, {{ profile.age }}</h3>
{% if profile.verified %}
<span class="inline-flex items-center text-[10px] rounded-full bg-emerald-100 text-emerald-800 px-2 py-0.5">проверено</span>
{% endif %}
</div>
{% if profile.city %}<p class="text-sm text-gray-600 mt-1">{{ profile.city }}</p>{% endif %}
{% if profile.about %}<p class="text-sm mt-3 line-clamp-2">{{ profile.about }}</p>{% endif %}
{% if profile.interests %}
<div class="mt-3 flex flex-wrap gap-2">
{% for tag in profile.interests %}
<span class="inline-flex items-center text-xs rounded-full bg-gray-100 px-2 py-1">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
<div class="mt-4 flex items-center justify-between">
<a class="text-sm font-medium text-indigo-700 hover:underline" href="/profiles/{{ profile.id }}/">Подробнее</a>
{% include 'ui/components/like_button.html' with profile_id=profile.id liked=liked %}
</div>
</div>
</article>
{% endwith %}