added a rudimentary user page

This commit is contained in:
bacalhau 2026-03-03 23:49:50 +00:00
parent 2f24f28b82
commit cd74903184
3 changed files with 93 additions and 31 deletions

View file

@ -6,26 +6,34 @@
<form method="POST">
<h3>Identity</h3>
<input type="text" name="username" placeholder="Username" required><br>
<textarea name="pgp" placeholder="PGP Public Key" required></textarea><br>
<input type="text" name="username" placeholder="Username" required>*<br>
<textarea name="pgp" placeholder="PGP Public Key" required></textarea>*<br>
<h3>Personal Info</h3>
<input type="text" name="firstname" placeholder="First Name" required><br>
<input type="text" name="lastname" placeholder="Last Name" required><br>
<input type="text" name="firstname" placeholder="First Name" required>*<br>
<input type="text" name="lastname" placeholder="Last Name" required>*<br>
<select name="sex" required>
<option value="">Select Sex</option>
<option value="male">Male</option>
<option value="female">Female</option>
</select><br>
</select>*<br>
<input type="date" name="date_of_birth" required><br>
<input type="date" name="date_of_birth" required>*<br>
<h3>Profile</h3>
<input type="text" name="profile_picture" placeholder="Profile Picture URL" required><br>
<h3>Profile Picture</h3>
<input type="file" name="profile_picture" accept="image/*" required>*<br>
<h3>Other Pictures</h3>
<input type="file" name="pictures" accept="image/*" multiple><br>
<h3>Location</h3>
<input type="text" name="country" placeholder="Country" required><br>
<select name="country" required>
<option value="">Select Country</option>
{% for c in countries %}
<option value="{{ c }}">{{ c }}</option>
{% endfor %}
</select>*<br>
<input type="text" name="city" placeholder="City"><br>
<h3>Physical Attributes</h3>

37
src/templates/user.html Normal file
View file

@ -0,0 +1,37 @@
{% extends "page.html" %}
{% block content %}
<h2>{{ user.firstname }} {{ user.lastname }}</h2>
<img src="{{ user.profile_picture }}" alt="Profile Picture" width="150"><br>
{% if user.pictures %}
<h3>Pictures</h3>
{% for pic in user.pictures %}
<img src="{{ pic }}" width="100">
{% endfor %}
{% endif %}
<h3>Personal Info</h3>
<p>Sex: {{ user.sex }}</p>
<p>Date of Birth: {{ user.date_of_birth }}</p>
<p>Age: {{ (date.today() - user.date_of_birth).days // 365 }}</p>
<p>Race: {{ user.race or 'Not specified' }}</p>
<h3>Location</h3>
<p>Country: {{ user.country }}</p>
<p>City: {{ user.city or 'Not specified' }}</p>
<h3>Physical Attributes</h3>
<p>Height: {{ user.height or 'Not specified' }} m</p>
<p>Weight: {{ user.weight or 'Not specified' }} kg</p>
<h3>Preferences</h3>
<p>Preferred Age Range: {{ user.prefered_age_range or 'Not specified' }}</p>
<p>Likes: {{ user.likes | join(', ') if user.likes else 'Not specified' }}</p>
<p>Dislikes: {{ user.dislikes | join(', ') if user.dislikes else 'Not specified' }}</p>
<h3>Contacts</h3>
<p>XMPP: {{ user.xmpp }}</p>
<p>Email: {{ user.email or 'Not specified' }}</p>
<p>Phone: {{ user.phone or 'Not specified' }}</p>
{% endblock %}