Ignore:
Timestamp:
06/26/2026 11:41:24 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
c7ecaf9
Parents:
3d37c67
Message:

style(fedi): nicer card layout for Notifications + My-replies

Notifications: emoji type-icons -> coloured SVG icons in tinted circles (gold like /
green boost / accent follow+reply), two-line hierarchy (who+time, then action+post),
reply preview in a tinted block, hover lift. My-replies: reply-arrow head with
'to @handle' + time, content indented, pill delete button with trash icon, hover lift.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/authorize-interaction.ejs

    r3d37c67 r2f42b60  
    99        <% manage.forEach(function(m){ %>
    1010          <li class="fedi-manage-item">
     11            <div class="fedi-manage-head">
     12              <span class="fedi-manage-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg></span>
     13              <% if (m.to_handle) { %><span class="fedi-manage-to"><%= m.to_handle %></span><% } %>
     14              <% if (m.created_at && typeof formatDateTime === 'function') { %><span class="fedi-manage-time"><%= formatDateTime(m.created_at) %></span><% } %>
     15            </div>
    1116            <div class="fedi-manage-content"><%- m.content %></div>
    1217            <div class="fedi-manage-foot">
    13               <span class="fedi-manage-meta"><% if (m.to_handle) { %>→ <%= m.to_handle %><% } %><% if (m.created_at && typeof formatDateTime === 'function') { %> · <%= formatDateTime(m.created_at) %><% } %></span>
    1418              <form method="post" action="/fediverse/<%= m.id %>/delete" onsubmit="return confirm('<%= t('fedi.delete_confirm') %>')">
    15                 <button type="submit" class="fedi-del-btn"><%= t('comments.delete') %></button>
     19                <button type="submit" class="fedi-del-btn"><svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg> <%= t('comments.delete') %></button>
    1620              </form>
    1721            </div>
     
    165169  .fedi-bigact-boost:hover, .fedi-bigact-boost.is-on { background: color-mix(in srgb, #2fa85a 16%, transparent); border-color: color-mix(in srgb, #2fa85a 55%, transparent); }
    166170  .fedi-manage { list-style: none; padding: 0; margin: 1.25rem 0 1rem; display: flex; flex-direction: column; gap: .7rem; }
    167   .fedi-manage-item { padding: .85rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); }
    168   .fedi-manage-content { line-height: 1.5; overflow-wrap: anywhere; }
     171  .fedi-manage-item { padding: .9rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ink, #000) 3.5%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); transition: border-color .15s ease, box-shadow .15s ease; }
     172  .fedi-manage-item:hover { border-color: color-mix(in srgb, var(--accent, #888) 28%, transparent); box-shadow: 0 2px 12px color-mix(in srgb, var(--ink, #000) 6%, transparent); }
     173  .fedi-manage-head { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
     174  .fedi-manage-icon { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
     175    background: color-mix(in srgb, var(--accent, #888) 16%, transparent); color: var(--accent, #06c); }
     176  .fedi-manage-icon svg { width: 14px; height: 14px; }
     177  .fedi-manage-to { font-weight: 600; color: var(--ink, inherit); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
     178  .fedi-manage-time { color: var(--ink-soft, #999); font-size: .76rem; margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
     179  .fedi-manage-content { line-height: 1.55; overflow-wrap: anywhere; padding-left: calc(26px + .5rem); }
    169180  .fedi-manage-content p { margin: .15rem 0; }
    170181  .fedi-manage-content p:first-child { margin-top: 0; }
    171182  .fedi-manage-content p:last-child { margin-bottom: 0; }
    172   .fedi-manage-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
    173   .fedi-manage-meta { color: var(--ink-soft, #999); font-size: .8rem; }
    174   .fedi-del-btn { border: 1px solid color-mix(in srgb, #d9534f 50%, transparent); background: color-mix(in srgb, #d9534f 12%, transparent); color: #e06b66; border-radius: 8px; padding: .3rem .75rem; font-size: .82rem; cursor: pointer; transition: background .15s ease; }
     183  .fedi-manage-foot { display: flex; justify-content: flex-end; margin-top: .65rem; }
     184  .fedi-del-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid color-mix(in srgb, #d9534f 45%, transparent); background: color-mix(in srgb, #d9534f 12%, transparent); color: #e06b66; border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .82rem; cursor: pointer; transition: background .15s ease; }
    175185  .fedi-del-btn:hover { background: color-mix(in srgb, #d9534f 24%, transparent); }
    176186</style>
Note: See TracChangeset for help on using the changeset viewer.