FossilRepo

fossilrepo / templates / accounts / profile_edit.html
1
{% extends "base.html" %}
2
{% block title %}Edit Profile — Fossilrepo{% endblock %}
3
4
{% block content %}
5
<div class="max-w-2xl">
6
<div class="flex items-center gap-3 mb-6">
7
<a href="{% url 'accounts:profile' %}" class="text-gray-400 hover:text-white">
8
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
9
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
10
</svg>
11
</a>
12
<h1 class="text-2xl font-bold text-gray-100">Edit Profile</h1>
13
</div>
14
15
<form method="post" class="space-y-6">
16
{% csrf_token %}
17
18
<div class="rounded-lg bg-gray-800 border border-gray-700 p-6 space-y-4 shadow-sm">
19
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
20
<div>
21
<label for="first_name" class="block text-sm font-medium text-gray-300 mb-1">First Name</label>
22
<input type="text" name="first_name" id="first_name" value="{{ user.first_name }}" maxlength="30"
23
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
24
</div>
25
<div>
26
<label for="last_name" class="block text-sm font-medium text-gray-300 mb-1">Last Name</label>
27
<input type="text" name="last_name" id="last_name" value="{{ user.last_name }}" maxlength="150"
28
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
29
</div>
30
</div>
31
32
<div>
33
<label for="email" class="block text-sm font-medium text-gray-300 mb-1">Email</label>
34
<input type="email" name="email" id="email" value="{{ user.email }}" maxlength="254"
35
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
36
</div>
37
38
<div>
39
<label for="handle" class="block text-sm font-medium text-gray-300 mb-1">Handle</label>
40
<div class="flex items-center">
41
<span class="text-gray-500 text-sm mr-1">@</span>
42
<input type="text" name="handle" id="handle" value="{{ user_profile.handle }}" maxlength="50"
43
pattern="[a-z0-9\-]+" title="Lowercase letters, numbers, and hyphens only"
44
placeholder="your-handle"
45
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
46
</div>
47
<p class="mt-1 text-xs text-gray-500">Alphanumeric and hyphens only. Used for @mentions.</p>
48
</div>
49
50
<div>
51
<label for="bio" class="block text-sm font-medium text-gray-300 mb-1">Bio</label>
52
<textarea name="bio" id="bio" rows="3" maxlength="500"
53
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">{{ user_profile.bio }}</textarea>
54
<p class="mt-1 text-xs text-gray-500">Max 500 characters.</p>
55
</div>
56
57
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
58
<div>
59
<label for="location" class="block text-sm font-medium text-gray-300 mb-1">Location</label>
60
<input type="text" name="location" id="location" value="{{ user_profile.location }}" maxlength="100"
61
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
62
</div>
63
<div>
64
<label for="website" class="block text-sm font-medium text-gray-300 mb-1">Website</label>
65
<input type="url" name="website" id="website" value="{{ user_profile.website }}" maxlength="200"
66
placeholder="https://"
67
class="w-full rounded-md border-gray-600 bg-gray-900 text-gray-100 text-sm px-3 py-2 focus:border-brand focus:ring-brand">
68
</div>
69
</div>
70
</div>
71
72
<div class="flex items-center gap-3">
73
<button type="submit" class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white hover:bg-brand-hover focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-2 focus:ring-offset-gray-950 transition-colors">
74
Save Changes
75
</button>
76
<a href="{% url 'accounts:profile' %}" class="text-sm text-gray-400 hover:text-white">Cancel</a>
77
</div>
78
</form>
79
</div>
80
{% endblock %}
81

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button