Complete authentication and profile features

This commit is contained in:
Olaf
2026-08-24 14:50:05 +02:00
parent 1c827956c4
commit 01702fcadf
17 changed files with 227 additions and 40 deletions
+11 -3
View File
@@ -23,7 +23,13 @@
{% if profile %}
<section class="link-item profile-summary">
<div class="link-header">
<div class="avatar">{{ profile.username[:1].upper() }}</div>
<div class="avatar">
{% if profile.avatar_url %}
<img src="{{ profile.avatar_url }}" alt="{{ profile.username }} avatar" />
{% else %}
{{ profile.username[:1].upper() }}
{% endif %}
</div>
<div class="user-name">{{ profile.username }}</div>
</div>
<p>{{ profile.bio or 'No profile information provided.' }}</p>
@@ -39,13 +45,15 @@
</label>
<label>
User filter
<input id="user-filter" type="text" placeholder="alice" />
<select id="user-filter">
<option value="">All users</option>
</select>
</label>
</section>
<section id="feed" class="feed" aria-live="polite"></section>
</main>
<script src="/static/feed.js"></script>
<script src="/static/feed.js?v=4"></script>
</body>
</html>
+3 -2
View File
@@ -37,9 +37,10 @@
<textarea id="bio" name="bio" rows="4"></textarea>
</label>
<label>
Avatar URL
<input id="avatar-url" name="avatar_url" type="url" value="https://example.com/avatar.png" />
Avatar image
<input id="avatar-file" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp" />
</label>
<img id="avatar-preview" class="profile-avatar-preview hidden" alt="Avatar preview" />
<button type="submit">Save profile</button>
<p id="profile-status" class="status" role="status"></p>
</form>