Changeset a78e051 in Klonkt


Ignore:
Timestamp:
06/27/2026 01:03:36 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
196e1be
Parents:
0a7ba90
Message:

fix(ui): avatar placeholder opens popup + smaller wrapping source label on tiles

  • views/partials/profile-header.ejs — the no-photo avatar (music-note/initial placeholder) is now a button that opens the profile-summary modal, like the photo case; the modal renders even without a photo (placeholder shown inside) + CSS for the placeholder.
  • assets/css/style.css — the cirkel-feed 'van <site>' source label on grid tiles was 1.44rem (bigger than the post title) and overflowed on mobile; now .72rem, wraps to 2 lines, chain icon kept large (1.3rem) beside it. Same for the no-cover gradient variant.
  • views/shell.ejs — bump style.css cache-buster v56->v57.
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r0a7ba90 ra78e051  
    23962396}
    23972397/* Bron-site (cirkel-feed): toont bij hover "van <site>" onder de titel. */
     2398/* Source label: small text that wraps to 2 lines if needed, with a big chain icon
     2399   beside it (the text was 1.44rem — bigger than the title — and overflowed on mobile). */
    23982400.grid-tile-overlay-src {
    23992401    color: #fff; opacity: .85;
    2400     font-size: 1.44rem; margin-top: .2rem;
    2401     display: inline-flex; align-items: center;
    2402 }
    2403 .grid-tile-overlay-src::before { content: "⛓"; margin-right: .25rem; font-size: .9em; }
     2402    font-size: .72rem; line-height: 1.2; margin-top: .25rem;
     2403    display: flex; align-items: center; gap: .3rem; width: 100%;
     2404}
     2405.grid-tile-overlay-src::before { content: "⛓"; font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
    24042406.grid-tile-gradient-src {
    2405     margin-top: .35rem; font-size: 1.44rem; opacity: .85;
     2407    margin-top: .35rem; font-size: .72rem; line-height: 1.2; opacity: .85;
    24062408    color: var(--ink-soft);
    2407     display: inline-flex; align-items: center;
    2408 }
    2409 .grid-tile-gradient-src::before { content: "⛓"; margin-right: .25rem; font-size: .9em; }
     2409    display: flex; align-items: center; gap: .3rem; width: 100%;
     2410}
     2411.grid-tile-gradient-src::before { content: "⛓"; font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
    24102412.grid-tile-overlay strong {
    24112413    color: #fff;
  • src/views/partials/profile-header.ejs

    r0a7ba90 ra78e051  
    4141  <div class="container profile-header-inner">
    4242
    43     <% if (_avatarUrl) { %>
    44       <%# With a real photo: clicking opens the profile-summary modal (photo + details). %>
    45       <button type="button" class="profile-photo" data-pf-summary aria-label="<%= _displayName || 'Profile' %>">
     43    <%# Clicking the avatar — photo OR placeholder — opens the profile-summary modal. %>
     44    <button type="button" class="profile-photo" data-pf-summary aria-label="<%= _displayName || 'Profile' %>">
     45      <% if (_avatarUrl) { %>
    4646        <img src="<%= _avatarUrl %>" alt="">
    47       </button>
    48     <% } else { %>
    49       <a class="profile-photo" href="<%= _base %>/"
    50          hx-get="<%= _base %>/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
    51          hx-push-url="<%= _base %>/" hx-indicator="#pcms-loading" aria-label="Home">
    52         <% if (site.enable_audio_player && (typeof audioEnabled === 'undefined' || audioEnabled)) { %>
    53           <span class="profile-photo-fallback profile-photo-fallback--music" aria-hidden="true">
    54             <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
    55               <path d="M9 17V5l12-2v12"/>
    56               <circle cx="6" cy="17" r="3"/>
    57               <circle cx="18" cy="15" r="3"/>
    58             </svg>
    59           </span>
    60         <% } else { %>
    61           <span class="profile-photo-fallback" aria-hidden="true"><%= (_displayName || '?').charAt(0).toUpperCase() %></span>
    62         <% } %>
    63       </a>
    64     <% } %>
     47      <% } else if (site.enable_audio_player && (typeof audioEnabled === 'undefined' || audioEnabled)) { %>
     48        <span class="profile-photo-fallback profile-photo-fallback--music" aria-hidden="true">
     49          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
     50            <path d="M9 17V5l12-2v12"/>
     51            <circle cx="6" cy="17" r="3"/>
     52            <circle cx="18" cy="15" r="3"/>
     53          </svg>
     54        </span>
     55      <% } else { %>
     56        <span class="profile-photo-fallback" aria-hidden="true"><%= (_displayName || '?').charAt(0).toUpperCase() %></span>
     57      <% } %>
     58    </button>
    6559
    6660    <div class="profile-info">
     
    114108<%# Profile-summary modal — opened by clicking the avatar. Shows photo + title + subtitle
    115109    + contact details + start date + premium status. %>
    116 <% if (_avatarUrl) { %>
    117110<div class="pf-summary">
    118111  <div class="pf-summary-card" role="dialog" aria-label="<%= _displayName %>">
    119112    <button type="button" class="pf-summary-close" aria-label="Sluiten">&times;</button>
    120     <img class="pf-summary-photo" src="<%= _avatarUrl %>" alt="">
     113    <% if (_avatarUrl) { %>
     114      <img class="pf-summary-photo" src="<%= _avatarUrl %>" alt="">
     115    <% } else { %>
     116      <div class="pf-summary-photo pf-summary-photo--ph" aria-hidden="true">
     117        <% if (site.enable_audio_player && (typeof audioEnabled === 'undefined' || audioEnabled)) { %>
     118          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 17V5l12-2v12"/><circle cx="6" cy="17" r="3"/><circle cx="18" cy="15" r="3"/></svg>
     119        <% } else { %><span><%= (_displayName || '?').charAt(0).toUpperCase() %></span><% } %>
     120      </div>
     121    <% } %>
    121122    <h3 class="pf-summary-name"><%= _displayName %></h3>
    122123    <span class="pf-summary-prem<%= _isPrem ? ' is-prem' : '' %>"><%= _isPrem ? '★ Premium' : t('profile.free') %></span>
     
    143144  </div>
    144145</div>
    145 <% } %>
    146146<% if (_showFollow) { %>
    147147<%# Follow-via-fediverse modal — replaces the native prompt() (which looked ugly). %>
     
    403403.pf-summary-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto .9rem;
    404404  display: block; border: 3px solid var(--paper-2); background: #fff; }
     405.pf-summary-photo--ph { display: flex; align-items: center; justify-content: center; background: var(--paper-2); }
     406.pf-summary-photo--ph svg { width: 46px; height: 46px; color: var(--accent); }
     407.pf-summary-photo--ph span { font-family: var(--font-display, serif); font-size: 2.6rem; font-weight: 700; color: var(--ink-soft); }
    405408.pf-summary-name { font-family: var(--font-display, serif); font-size: 1.4rem; margin: 0 0 .35rem; }
    406409.pf-summary-prem { display: inline-block; margin: 0 0 .7rem; padding: .15rem .6rem; border-radius: 999px;
  • src/views/shell.ejs

    r0a7ba90 ra78e051  
    198198
    199199<!-- v9 stylesheet (full palette system) -->
    200 <link rel="stylesheet" href="/assets/css/style.css?v=56">
     200<link rel="stylesheet" href="/assets/css/style.css?v=57">
    201201<script>
    202202/* iOS safe-area, built by hand. env(safe-area-inset-top) resolves to 0 on this iOS in
Note: See TracChangeset for help on using the changeset viewer.