Profilbilder: Avatar-Upload, Anzeige auf Profil & Feed
- user.avatar-Spalte (Schema, migrate.sh, Migrationsdoku)
- POST /user/avatar (geschützt): Upload via storeImage, ersetzt/löscht altes Bild
- avatar in /u/{name}/info, /user/info und im entrySelect-Join (Feed-Karten)
- Account-Löschung entfernt auch das Avatar-File
- Frontend: Avatar im Profilkopf + Byline der Karten (50px), Upload-Form,
Platzhalterbild no_profile_pic.jpg als Fallback
- .card img per :not(.avatar) von Beitragsbildern getrennt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -19,12 +19,25 @@
|
||||
|
||||
<main>
|
||||
<section id="profile">
|
||||
<h2 id="profile-name"></h2>
|
||||
<p id="profile-info" class="muted"></p>
|
||||
<div class="profile-head">
|
||||
<img id="profile-avatar" class="avatar avatar-lg" src="/static/assets/no_profile_pic.jpg" alt="">
|
||||
<div>
|
||||
<h2 id="profile-name"></h2>
|
||||
<p id="profile-info" class="muted"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Nur für den Eigentümer sichtbar -->
|
||||
<div id="settings" hidden>
|
||||
<h2>Einstellungen</h2>
|
||||
<details>
|
||||
<summary>Profilbild ändern</summary>
|
||||
<form id="avatar-form">
|
||||
<input name="avatar" type="file" accept="image/*">
|
||||
<button type="submit">Bild hochladen</button>
|
||||
</form>
|
||||
<p class="msg" id="avatar-msg"></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Name ändern</summary>
|
||||
<form id="rename-form">
|
||||
|
||||
Reference in New Issue
Block a user