Changeset 99989f9 in Klonkt for src/views/partials


Ignore:
Timestamp:
06/28/2026 04:57:19 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
201ec06
Parents:
74c5abc
Message:

feat(images): route all remaining avatars through avatar() (downscaled)

Wrap every avatar/profile-photo <img> src in avatar(): feed/comment/follow + nav, profile
header/sheet/bottom-tab, account, EPK hero, admin user list, site-edit preview. Local avatars
go through the thumb route, remote ones through the signed proxy. Covers (thumb()) untouched.

Location:
src/views/partials
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/bottom-tab.ejs

    r74c5abc r99989f9  
    8585            aria-label="Profiel menu" aria-haspopup="dialog">
    8686      <% if (user.avatar_url) { %>
    87         <img class="bottom-tab-avatar bottom-tab-avatar-img" src="<%= user.avatar_url %>" alt="">
     87        <img class="bottom-tab-avatar bottom-tab-avatar-img" src="<%= avatar(user.avatar_url, 128) %>" alt="">
    8888      <% } else { %>
    8989        <span class="bottom-tab-avatar"><%= user.username.charAt(0).toUpperCase() %></span>
  • src/views/partials/profile-header.ejs

    r74c5abc r99989f9  
    4444    <button type="button" class="profile-photo" data-pf-summary aria-label="<%= _displayName || 'Profile' %>">
    4545      <% if (_avatarUrl) { %>
    46         <img src="<%= _avatarUrl %>" alt="">
     46        <img src="<%= avatar(_avatarUrl, 320) %>" alt="">
    4747      <% } else if (site.enable_audio_player && (typeof audioEnabled === 'undefined' || audioEnabled)) { %>
    4848        <span class="profile-photo-fallback profile-photo-fallback--music" aria-hidden="true">
     
    112112    <button type="button" class="pf-summary-close" aria-label="Sluiten">&times;</button>
    113113    <% if (_avatarUrl) { %>
    114       <img class="pf-summary-photo" src="<%= _avatarUrl %>" alt="">
     114      <img class="pf-summary-photo" src="<%= avatar(_avatarUrl, 128) %>" alt="">
    115115    <% } else { %>
    116116      <div class="pf-summary-photo pf-summary-photo--ph" aria-hidden="true">
  • src/views/partials/profile-sheet.ejs

    r74c5abc r99989f9  
    3737    <div class="profile-sheet-header">
    3838      <% if (user.avatar_url) { %>
    39         <img class="profile-sheet-avatar profile-sheet-avatar-img" src="<%= user.avatar_url %>" alt="" aria-hidden="true">
     39        <img class="profile-sheet-avatar profile-sheet-avatar-img" src="<%= avatar(user.avatar_url, 128) %>" alt="" aria-hidden="true">
    4040      <% } else { %>
    4141        <div class="profile-sheet-avatar" aria-hidden="true"><%= user.username.charAt(0).toUpperCase() %></div>
  • src/views/partials/topnav.ejs

    r74c5abc r99989f9  
    113113          <summary class="nav-btn user-toggle" aria-label="Gebruikersmenu">
    114114            <% if (user.avatar_url) { %>
    115               <img class="user-avatar user-avatar-img" src="<%= user.avatar_url %>" alt="">
     115              <img class="user-avatar user-avatar-img" src="<%= avatar(user.avatar_url, 128) %>" alt="">
    116116            <% } else { %>
    117117              <span class="user-avatar"><%= user.username.charAt(0).toUpperCase() %></span>
     
    121121            <div class="user-dropdown-header">
    122122              <% if (user.avatar_url) { %>
    123                 <img class="udh-avatar" src="<%= user.avatar_url %>" alt="">
     123                <img class="udh-avatar" src="<%= avatar(user.avatar_url, 128) %>" alt="">
    124124              <% } else { %>
    125125                <span class="udh-avatar udh-avatar-fallback"><%= user.username.charAt(0).toUpperCase() %></span>
Note: See TracChangeset for help on using the changeset viewer.