kitgit

tirbofish/kitgit

main / templates / profile_settings.html · 1402 bytes

templates/profile_settings.html
{% extends "layout.html" %}

{% block title %}profile settings — kitgit{% endblock %}

{% block content %}
<section class="kg-section">
  <span class="kg-kicker">settings</span>
  <h1 class="kg-title">Profile</h1>
  <nav class="kg-tabs" aria-label="Settings">
    <a href="/settings/profile" aria-current="page">profile</a>
    <a href="/settings/account">account</a>
    <a href="/settings/mfa">mfa</a>
    <a href="/settings/keys">ssh / gpg</a>
  </nav>
  {% if let Some(err) = error %}
    <div class="kg-flash">{{ err }}</div>
  {% endif %}
  <div class="kg-profile-head">
    <img class="kg-avatar kg-avatar--lg" src="{{ avatar_url }}" alt="" />
    <div>
      <p class="kg-title">{{ user.username }}</p>
      {% if user.show_email && !user.email.is_empty() %}
      <p class="kg-muted">{{ user.email }}</p>
      {% endif %}
    </div>
  </div>
  <form class="kg-form" method="post" action="/settings/profile" enctype="multipart/form-data">
    <label>
      display name
      <input type="text" name="display_name" value="{{ user.display_name }}" />
    </label>
    <label>
      bio
      <textarea name="bio" rows="4">{{ user.bio }}</textarea>
    </label>
    <label>
      avatar
      <input type="file" name="avatar" accept="image/*" />
    </label>
    <div class="kg-actions">
      <button class="kg-btn" type="submit">save</button>
    </div>
  </form>
</section>
{% endblock %}