OXYGENHUB
# f5c443378333 oxygenhub / templates / settings.html
1.8 KiB · HTML · last changed Theme switch, auto theme, and a highlighting fix 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
<form class="card" method="post" action="/settings">
10
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
11
  <label for="display_name">Display name</label><input type="text" id="display_name" name="display_name" value="{{ me.display_name }}">
12
  <label for="email">Email</label><input type="email" id="email" name="email" value="{{ me.email }}">
13
  <button type="submit">SAVE</button>
14
</form>
15
<form class="card" method="post" action="/settings/appearance">
16
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
17
  <h2>Appearance</h2>
18
  <fieldset class="choices">
19
    <legend class="small mute">Theme, remembered in this browser</legend>
20
    {% for (value, label) in themes %}
21
    <label class="choice"><input type="radio" name="theme" value="{{ value }}"{% if theme == *value %} checked{% endif %}> {{ label }}</label>
22
    {% endfor %}
23
  </fieldset>
24
  <button type="submit">SAVE</button>
25
</form>
26
<form class="card" method="post" action="/settings/password">
27
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
28
  <h2>Change password</h2>
29
  <label for="current">Current password</label><input type="password" id="current" name="current" autocomplete="current-password" required>
30
  <label for="password">New password</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
31
  <p class="small mute">Changing it signs out every other session.</p>
32
  <button type="submit">CHANGE PASSWORD</button>
33
</form>
34
{% endblock %}