OXYGENHUB
# 56a786aa42f1 oxygenhub / templates / settings.html
2.7 KiB · HTML · last changed Repository and settings pages: centred browser, clone on top, section lists 1 month ago source blame history raw
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 %}
9
<div class="sectioned">
10
<nav class="section-nav" aria-label="Sections">
11
  <a href="#profile">Profile</a>
12
  <a href="#appearance">Appearance</a>
13
  <a href="#password">Password</a>
14
</nav>
15
<div class="sections">
16
<form class="card" id="profile" method="post" action="/settings">
17
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
18
  <label for="display_name">Display name</label><input type="text" id="display_name" name="display_name" value="{{ me.display_name }}">
19
  <label for="email">Email</label><input type="email" id="email" name="email" value="{{ me.email }}">
20
  <p class="small mute">Your email is never shown on your profile.</p>
21
  <label for="bio">Bio</label><textarea id="bio" name="bio" rows="3" maxlength="280">{{ me.bio }}</textarea>
22
  <label for="website">Website</label><input type="url" id="website" name="website" value="{{ me.website }}" placeholder="https://">
23
  <label for="location">Location</label><input type="text" id="location" name="location" value="{{ me.location }}" maxlength="80">
24
  <p class="small mute">Shown on <a href="/{{ me.username }}">your profile</a>, with a picture drawn from your username.</p>
25
  <button type="submit">SAVE</button>
26
</form>
27
<form class="card" id="appearance" method="post" action="/settings/appearance">
28
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
29
  <h2>Appearance</h2>
30
  <fieldset class="choices">
31
    <legend class="small mute">Theme, remembered in this browser</legend>
32
    {% for (value, label) in themes %}
33
    <label class="choice"><input type="radio" name="theme" value="{{ value }}"{% if theme == *value %} checked{% endif %}> {{ label }}</label>
34
    {% endfor %}
35
  </fieldset>
36
  <button type="submit">SAVE</button>
37
</form>
38
<form class="card" id="password" method="post" action="/settings/password">
39
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
40
  <h2>Change password</h2>
41
  <label for="current">Current password</label><input type="password" id="current" name="current" autocomplete="current-password" required>
42
  <label for="password">New password</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
43
  <p class="small mute">Changing it signs out every other session.</p>
44
  <button type="submit">CHANGE PASSWORD</button>
45
</form>
46
</div>
47
</div>
48
{% endblock %}