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 >
1062a0f8 Andy McCall 5 hours ago ↶
13
< a href = " #repositories" > New repositories</ a >
64caed18 Andy McCall 1 month ago ↶
14
< a href = " #appearance" > Appearance</ a >
15
< a href = " #password" > Password</ a >
16
</ nav >
17
< div class = " sections " >
34beb1a7 Andy McCall 1 month ago ↶
18
< 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 ↶
19
< form class = " card " id = " profile " method = " post" action = " /settings" >
19bb31ff Andy McCall 1 month ago ↶
20
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
21
< label for = " display_name" > Display name</ label > < input type = " text" id = " display_name " name = " display_name" value = " {{ me.display_name }}" >
22
< label for = " email" > Email</ label > < input type = " email" id = " email " name = " email" value = " {{ me.email }}" >
34beb1a7 Andy McCall 1 month ago ↶
23
< 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 ↶
24
< label for = " bio" > Bio</ label > < textarea id = " bio " name = " bio" rows = " 3" maxlength = " 280" > {{ me.bio }}</ textarea >
25
< label for = " website" > Website</ label > < input type = " url" id = " website " name = " website" value = " {{ me.website }}" placeholder = " https://" >
26
< label for = " location" > Location</ label > < input type = " text" id = " location " name = " location" value = " {{ me.location }}" maxlength = " 80" >
89e89836 Andy McCall 1 month ago ↶
27
< label for = " bluesky" > Bluesky</ label > < input type = " text" id = " bluesky " name = " bluesky" value = " {{ me.bluesky }}" placeholder = " andy.bsky.social" >
28
< label for = " mastodon" > Mastodon</ label > < input type = " text" id = " mastodon " name = " mastodon" value = " {% if !me.mastodon.is_empty() %}@{{ me.mastodon }}{% endif %}" placeholder = " @[email protected] " >
29
< label for = " github" > GitHub</ label > < input type = " text" id = " github " name = " github" value = " {{ me.github }}" placeholder = " andymccall" >
10174045 Andy McCall 1 month ago ↶
30
< 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 ↶
31
< button type = " submit" > SAVE</ button >
a160b98f Andy McCall 1 month ago ↶
32
</ form >
33
< form class = " card picture-card " id = " picture " method = " post" action = " /settings/avatar" enctype = " multipart/form-data" >
34
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
35
< h2 > Picture</ h2 >
36
< div class = " picture-row " >
37
< img class = " avatar xl " src = " /avatar/{{ me.username }}?v={{ me.avatar }}" alt = " Your picture" width = " 96" height = " 96" >
38
< div >
39
< label for = " picture-file" > Upload a photo</ label >
40
< input type = " file" id = " picture-file " name = " picture" accept = " image/png,image/jpeg,image/webp" >
41
< 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 >
42
< button type = " submit" name = " action" value = " upload" > UPLOAD</ button >
43
{% if !me.avatar.is_empty() %}< button type = " submit" name = " action" value = " remove" class = " danger-btn " > REMOVE</ button > {% endif %}
44
</ div >
45
</ div >
19bb31ff Andy McCall 1 month ago ↶
46
</ form >
1062a0f8 Andy McCall 5 hours ago ↶
47
< form class = " card " id = " repositories " method = " post" action = " /settings/repositories" >
48
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
49
< h2 > New repositories</ h2 >
50
< label for = " default_bookmark" > Default bookmark</ label >
51
< input type = " text" id = " default_bookmark " name = " default_bookmark" value = " {{ default_bookmark }}" placeholder = " {{ site_bookmark }}" pattern = " [A-Za-z0-9][A-Za-z0-9._-]{0,63}" autocomplete = " off" spellcheck = " false" >
52
< p class = " small mute " > The bookmark your new repositories start with, such as < code > develop</ code > . Left empty, they take this site's: < code > {{ site_bookmark }}</ code > . An organisation sets its own under its settings.</ p >
53
< button type = " submit" > SAVE</ button >
54
</ form >
64caed18 Andy McCall 1 month ago ↶
55
< form class = " card " id = " appearance " method = " post" action = " /settings/appearance" >
c40c2d3e Andy McCall 1 month ago ↶
56
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
57
< h2 > Appearance</ h2 >
58
< fieldset class = " choices " >
59
< legend class = " small mute " > Theme, remembered in this browser</ legend >
60
{% for (value, label) in themes %}
61
< label class = " choice " > < input type = " radio" name = " theme" value = " {{ value }}" {% if theme = = *value %} checked {% endif %}> {{ label }}</ label >
62
{% endfor %}
63
</ fieldset >
17ca6cdd Andy McCall 22 days ago ↶
64
< fieldset class = " choices " >
65
< legend class = " small mute " > Background, behind the dashboard: drifting marks for your repositories' last 30 days</ legend >
66
{% for (value, label) in backdrops %}
67
< label class = " choice " > < input type = " radio" name = " backdrop" value = " {{ value }}" {% if backdrop = = *value %} checked {% endif %}> {{ label }}</ label >
68
{% endfor %}
69
</ fieldset >
c40c2d3e Andy McCall 1 month ago ↶
70
< button type = " submit" > SAVE</ button >
71
</ form >
64caed18 Andy McCall 1 month ago ↶
72
< form class = " card " id = " password " method = " post" action = " /settings/password" >
19bb31ff Andy McCall 1 month ago ↶
73
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
74
< h2 > Change password</ h2 >
75
< label for = " current" > Current password</ label > < input type = " password" id = " current " name = " current" autocomplete = " current-password" required >
76
< label for = " password" > New password</ label > < input type = " password" id = " password " name = " password" autocomplete = " new-password" required minlength = " 10" >
77
< p class = " small mute " > Changing it signs out every other session.</ p >
78
< button type = " submit" > CHANGE PASSWORD</ button >
79
</ form >
64caed18 Andy McCall 1 month ago ↶
80
</ div >
81
</ div >
19bb31ff Andy McCall 1 month ago ↶
82
{% endblock %}