1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{% 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 %}