{% extends "base.html" %}
{% block title %}Профиль{% endblock %}

{% block content %}
  <div class="feed">
  {% if error %}
    <div class="alert">{{ error }}</div>
  {% endif %}

  <div class="card">
    <strong>nickname:</strong> {{ user["nickname"] }}<br></bt>
    <strong>email:</strong> {{ user["email"] }}

    {% if user["avatar_filename"] %}
      <img class="avatar-big" src="{{ url_for('static', filename='avatars/' ~ user['avatar_filename']) }}" alt="">
    {% endif %}

    <form method="post" enctype="multipart/form-data">
      <input type="file" name="avatar" accept=".gif,.png,.jpg,.jpeg,.webp"><br>
      <button type="submit">Загрузить</button>
    </form>
  </div>
  </div>
{% endblock %}
