Changeset 6150acb in Klonkt
- Timestamp:
- 06/14/2026 04:55:06 PM (3 months ago)
- Branches:
- main
- Children:
- 42081fb
- Parents:
- ab544fd
- File:
-
- 1 edited
-
src/views/pages/account.ejs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/account.ejs
rab544fd r6150acb 17 17 18 18 <div class="ax-profile-id"> 19 <div class="ax-profile-avatar"> 20 <% if (account.avatar_url) { %> 21 <img src="<%= account.avatar_url %>" alt=""> 22 <% } else { %> 23 <span><%= account.username.charAt(0).toUpperCase() %></span> 24 <% } %> 25 </div> 19 <form action="/account/avatar" method="post" enctype="multipart/form-data" class="ax-avatar-form"> 20 <label class="ax-avatar-wrap" title="Klik om je foto te wijzigen"> 21 <span class="ax-profile-avatar"> 22 <% if (account.avatar_url) { %> 23 <img src="<%= account.avatar_url %>" alt=""> 24 <% } else { %> 25 <span><%= account.username.charAt(0).toUpperCase() %></span> 26 <% } %> 27 </span> 28 <span class="ax-avatar-edit" aria-hidden="true"> 29 <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg> 30 </span> 31 <input type="file" name="avatar" accept="image/jpeg,image/png,image/webp,image/gif" onchange="this.form.submit()" hidden> 32 </label> 33 </form> 26 34 <div class="ax-profile-meta"> 27 35 <div class="ax-profile-name"><%= account.username %></div> … … 30 38 <div class="ax-profile-joined">Lid sinds <%= formatDate(account.created_at) %></div> 31 39 <% } %> 40 <% if (account.avatar_url) { %> 41 <form action="/account/avatar/remove" method="post" class="ax-avatar-remove"> 42 <button type="submit" class="ax-linkbtn">Foto verwijderen</button> 43 </form> 44 <% } %> 32 45 </div> 33 46 </div> 34 35 <form action="/account/avatar" method="post" enctype="multipart/form-data" class="ax-form">36 <label class="ax-field ax-file">37 <span>Avatar uploaden <small>(jpg/png/webp/gif, max 5 MB)</small></span>38 <span class="ax-file-control">39 <span class="ax-btn ax-btn-secondary ax-file-btn">📷 Kies bestand</span>40 <span class="ax-file-name" data-empty>Geen bestand gekozen</span>41 <input type="file" name="avatar" accept="image/jpeg,image/png,image/webp,image/gif" required>42 </span>43 </label>44 <div class="ax-form-actions">45 <button type="submit" class="ax-btn ax-btn-primary">⬆ Uploaden</button>46 <% if (account.avatar_url) { %>47 <%# Separate <form> block kept inline since it submits to a different endpoint. %>48 <button type="button" class="ax-btn" onclick="document.getElementById('avatar-remove-form').submit()">Avatar verwijderen</button>49 <% } %>50 </div>51 </form>52 <% if (account.avatar_url) { %>53 <form action="/account/avatar/remove" method="post" id="avatar-remove-form" hidden></form>54 <% } %>55 47 56 48 <form action="/account/profile" method="post" class="ax-form ax-form-bio"> … … 60 52 </label> 61 53 <div class="ax-form-actions"> 62 <button type="submit" class="ax-btn ax-btn-primary"> 💾Bio opslaan</button>54 <button type="submit" class="ax-btn ax-btn-primary">Bio opslaan</button> 63 55 </div> 64 56 </form> … … 85 77 </div> 86 78 <div class="ax-form-actions"> 87 <button type="submit" class="ax-btn ax-btn-primary"> 🔒Wachtwoord wijzigen</button>79 <button type="submit" class="ax-btn ax-btn-primary">Wachtwoord wijzigen</button> 88 80 </div> 89 81 </form> … … 216 208 margin-bottom: 1rem; 217 209 } 210 .ax-avatar-form { margin: 0; flex-shrink: 0; } 211 .ax-avatar-wrap { 212 position: relative; display: block; 213 width: 84px; height: 84px; cursor: pointer; 214 } 218 215 .ax-profile-avatar { 219 width: 64px; height: 64px;216 width: 84px; height: 84px; 220 217 border-radius: 50%; 221 218 overflow: hidden; … … 224 221 display: inline-flex; align-items: center; justify-content: center; 225 222 font-family: var(--font-display, serif); 226 font-size: 1.6rem; font-weight: 600; 227 flex-shrink: 0; 228 } 223 font-size: 1.7rem; font-weight: 600; 224 border: 1px solid var(--rule); 225 transition: border-color 120ms; 226 } 227 .ax-avatar-wrap:hover .ax-profile-avatar { border-color: var(--accent); } 229 228 .ax-profile-avatar img { width: 100%; height: 100%; object-fit: cover; } 229 .ax-avatar-edit { 230 position: absolute; right: -2px; bottom: -2px; 231 width: 28px; height: 28px; border-radius: 50%; 232 background: var(--accent); color: #fff; 233 display: flex; align-items: center; justify-content: center; 234 border: 3px solid var(--paper); 235 transition: transform 120ms; 236 } 237 .ax-avatar-wrap:hover .ax-avatar-edit { transform: scale(1.08); } 238 .ax-avatar-remove { margin-top: 0.45rem; } 239 .ax-linkbtn { 240 background: none; border: 0; padding: 0; cursor: pointer; 241 color: var(--ink-muted, var(--ink-soft)); font-size: 0.8rem; text-decoration: underline; 242 font-family: var(--font-ui, system-ui), sans-serif; 243 } 244 .ax-linkbtn:hover { color: #c33; } 230 245 .ax-profile-meta { min-width: 0; } 231 246 .ax-profile-name { font-weight: 600; font-size: 1.1rem; }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)