85 lines
3.3 KiB
HTML
85 lines
3.3 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Анкета пользователя</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<link href="{% static 'style.css' %}" rel="stylesheet">
|
|
<style>
|
|
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif; margin:0; background:#f7f7fb; color:#111; }
|
|
.topbar { display:flex; gap:16px; align-items:center; padding:14px 18px; background:#111827; color:#fff; }
|
|
.topbar a { color:#cfe3ff; text-decoration:none; }
|
|
.container { max-width:900px; margin:24px auto; padding:0 16px; }
|
|
.card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:18px; }
|
|
.row { display:flex; gap:18px; align-items:center; }
|
|
.grow { flex:1 1 auto; }
|
|
.muted { color:#6b7280; font-size:14px; }
|
|
.pill { display:inline-block; padding:4px 10px; border-radius:999px; background:#eef2ff; color:#3730a3; font-size:12px; margin:2px 6px 2px 0; }
|
|
.avatar { width:96px; height:96px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:32px; background:#e5e7eb; color:#374151; }
|
|
.avatar img { width:96px; height:96px; object-fit:cover; border-radius:50%; display:block; }
|
|
dl { display:grid; grid-template-columns: 220px 1fr; gap:8px 14px; margin:0; }
|
|
dt { font-weight:600; color:#374151; }
|
|
dd { margin:0; color:#111827; }
|
|
.btn { display:inline-block; padding:9px 12px; border-radius:10px; border:1px solid #d1d5db; background:#fff; cursor:pointer; font-weight:600; text-decoration:none; color:#111; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<header class="topbar">
|
|
<div style="flex:1 1 auto;">Карточка пользователя (ADMIN)</div>
|
|
<nav style="display:flex; gap:14px;">
|
|
<a href="{% url 'profiles' %}">← Каталог</a>
|
|
<a href="{% url 'cabinet' %}">Кабинет</a>
|
|
<a href="{% url 'logout' %}">Выход</a>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container">
|
|
|
|
<div class="card">
|
|
<div class="row">
|
|
<div class="avatar">
|
|
{% if profile.photo %}
|
|
<img src="{{ profile.photo }}" alt="">
|
|
{% else %}
|
|
{{ profile.name|first|upper }}
|
|
{% endif %}
|
|
</div>
|
|
<div class="grow">
|
|
<div style="font-weight:700; font-size:20px;">{{ profile.name }}</div>
|
|
|
|
</div>
|
|
<div>
|
|
<form method="post" action="{% url 'like_profile' profile.id %}">
|
|
{% csrf_token %}
|
|
{% include "ui/components/like_button.html" with profile_id=profile.id liked=liked %}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-top:16px;">
|
|
<h2 class="muted" style="margin-top:0;">Профиль</h2>
|
|
<dl>
|
|
<dt>Пол</dt><dd>{{ profile.gender|default:"—" }}</dd>
|
|
<dt>Город</dt><dd>{{ profile.city|default:"—" }}</dd>
|
|
<dt>Языки</dt>
|
|
<dd>
|
|
{% if profile.languages %}
|
|
{% for lang in profile.languages %}<span class="pill">{{ lang }}</span>{% endfor %}
|
|
{% else %} — {% endif %}
|
|
</dd>
|
|
<dt>Интересы</dt>
|
|
<dd>
|
|
{% if profile.interests %}
|
|
{% for it in profile.interests %}<span class="pill">{{ it }}</span>{% endfor %}
|
|
{% else %} — {% endif %}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
</main>
|
|
</body>
|
|
</html>
|