19bb31ff Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% import "settings_tabs.html" as t %}
3
{% block title %}Profile{% endblock %}
4
{% block tabs %}{% call t::tabs("profile") %}{% endblock %}
5
{% block content %}
6
< div class = " head " > < h1 > Profile < small > {{ me.username }}</ small > </ h1 > </ div >
7
{% if let Some(n) = notice %}< p class = " note " > {{ n }}</ p > {% endif %}
8
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
64caed18 Andy McCall 1 month ago ↶
9
< div class = " sectioned " >
10
< nav class = " section-nav " aria-label = " Sections" >
11
< a href = " #profile" > Profile</ a >
a160b98f Andy McCall 1 month ago ↶
12
< a href = " #picture" > Picture</ a >
64caed18 Andy McCall 1 month ago ↶
13
< a href = " #appearance" > Appearance</ a >
14
< a href = " #password" > Password</ a >
15
</ nav >
16
< div class = " sections " >
34beb1a7 Andy McCall 1 month ago ↶
17
< form id = " verify-email " method = " post" action = " /settings/email/verify" hidden > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > </ form >
64caed18 Andy McCall 1 month ago ↶
18
< form class = " card " id = " profile " method = " post" action = " /settings" >
19bb31ff Andy McCall 1 month ago ↶
19
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
20
< label for = " display_name" > Display name</ label > < input type = " text" id = " display_name " name = " display_name" value = " {{ me.display_name }}" >
21
< label for = " email" > Email</ label > < input type = " email" id = " email " name = " email" value = " {{ me.email }}" >
34beb1a7 Andy McCall 1 month ago ↶
22
< p class = " small mute " > Your email is never shown on your profile. {% if me.email.is_empty() %}Add one to receive notification email and reset your password by email.{% else if me.email_verified %}< span class = " sig sig-valid " > ✔</ span > Verified.{% else %}< span class = " sig sig-unsigned " > ○</ span > Not verified yet{% if mail %}: use the link we sent, or < button type = " submit" form = " verify-email" class = " linkish " > send a new one</ button > {% endif %}.{% endif %}</ p >
10174045 Andy McCall 1 month ago ↶
23
< label for = " bio" > Bio</ label > < textarea id = " bio " name = " bio" rows = " 3" maxlength = " 280" > {{ me.bio }}</ textarea >
24
< label for = " website" > Website</ label > < input type = " url" id = " website " name = " website" value = " {{ me.website }}" placeholder = " https://" >
25
< label for = " location" > Location</ label > < input type = " text" id = " location " name = " location" value = " {{ me.location }}" maxlength = " 80" >
26
< p class = " small mute " > Shown on < a href = " /{{ me.username }}" > your profile</ a > , with a picture drawn from your username.</ p >
19bb31ff Andy McCall 1 month ago ↶
27
< button type = " submit" > SAVE</ button >
a160b98f Andy McCall 1 month ago ↶
28
</ form >
29
< form class = " card picture-card " id = " picture " method = " post" action = " /settings/avatar" enctype = " multipart/form-data" >
30
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
31
< h2 > Picture</ h2 >
32
< div class = " picture-row " >
33
< img class = " avatar xl " src = " /avatar/{{ me.username }}?v={{ me.avatar }}" alt = " Your picture" width = " 96" height = " 96" >
34
< div >
35
< label for = " picture-file" > Upload a photo</ label >
36
< input type = " file" id = " picture-file " name = " picture" accept = " image/png,image/jpeg,image/webp" >
37
< p class = " small mute " > PNG, JPEG or WebP, up to 5 MiB. It is cropped to the middle square and resized to 400×400.{% if me.avatar.is_empty() %} Until then you have a picture drawn from your username.{% endif %}</ p >
38
< button type = " submit" name = " action" value = " upload" > UPLOAD</ button >
39
{% if !me.avatar.is_empty() %}< button type = " submit" name = " action" value = " remove" class = " danger-btn " > REMOVE</ button > {% endif %}
40
</ div >
41
</ div >
19bb31ff Andy McCall 1 month ago ↶
42
</ form >
64caed18 Andy McCall 1 month ago ↶
43
< form class = " card " id = " appearance " method = " post" action = " /settings/appearance" >
c40c2d3e Andy McCall 1 month ago ↶
44
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
45
< h2 > Appearance</ h2 >
46
< fieldset class = " choices " >
47
< legend class = " small mute " > Theme, remembered in this browser</ legend >
48
{% for (value, label) in themes %}
49
< label class = " choice " > < input type = " radio" name = " theme" value = " {{ value }}" {% if theme = = *value %} checked {% endif %}> {{ label }}</ label >
50
{% endfor %}
51
</ fieldset >
52
< button type = " submit" > SAVE</ button >
53
</ form >
64caed18 Andy McCall 1 month ago ↶
54
< form class = " card " id = " password " method = " post" action = " /settings/password" >
19bb31ff Andy McCall 1 month ago ↶
55
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
56
< h2 > Change password</ h2 >
57
< label for = " current" > Current password</ label > < input type = " password" id = " current " name = " current" autocomplete = " current-password" required >
58
< label for = " password" > New password</ label > < input type = " password" id = " password " name = " password" autocomplete = " new-password" required minlength = " 10" >
59
< p class = " small mute " > Changing it signs out every other session.</ p >
60
< button type = " submit" > CHANGE PASSWORD</ button >
61
</ form >
64caed18 Andy McCall 1 month ago ↶
62
</ div >
63
</ div >
19bb31ff Andy McCall 1 month ago ↶
64
{% endblock %}