Ignore:
Timestamp:
06/19/2026 08:39:16 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
0804d61
Parents:
da6fd02
Message:

ui: comment moderation "Recent decisions" as cards instead of a flat table

Card list with status pill, author + post + date, coloured left border per
status (green=approved/red=rejected), responsive (wraps on narrow screen).

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-comments.ejs

    rda6fd02 ra474bd2  
    4747    <p class="muted">Nothing yet.</p>
    4848  <% } else { %>
    49     <table class="admin-table">
    50       <thead>
    51         <tr><th>Author</th><th>Post</th><th>Status</th><th>Date</th></tr>
    52       </thead>
    53       <tbody>
    54         <% recent.forEach(function(c) { %>
    55           <tr class="status-<%= c.status %>">
    56             <td><%= c.author_username %></td>
    57             <td><a href="<%= siteUrlBase %>/<%= c.post_slug %>"><%= c.post_title || c.post_slug %></a></td>
    58             <td>
    59               <span class="status-pill status-pill--<%= c.status %>"><%= c.status %></span>
    60             </td>
    61             <td><%= formatDateTime(c.created_at) %></td>
    62           </tr>
    63         <% }); %>
    64       </tbody>
    65     </table>
     49    <ul class="decision-list">
     50      <% recent.forEach(function(c) { %>
     51        <li class="decision-card decision-card--<%= c.status %>">
     52          <span class="status-pill status-pill--<%= c.status %>"><%= c.status %></span>
     53          <div class="decision-main">
     54            <span class="decision-author"><%= c.author_username %></span>
     55            <a class="decision-post" href="<%= siteUrlBase %>/<%= c.post_slug %>"><%= c.post_title || c.post_slug %></a>
     56          </div>
     57          <span class="decision-date"><%= formatDateTime(c.created_at) %></span>
     58        </li>
     59      <% }); %>
     60    </ul>
    6661  <% } %>
    6762</div>
     
    10297.status-pill--pending  { background: var(--paper); color: var(--ink-muted, var(--ink-soft)); }
    10398
     99/* Recent decisions als cards (i.p.v. een platte tabel) */
     100.decision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
     101.decision-card {
     102  display: flex; align-items: center; gap: 0.85rem;
     103  padding: 0.7rem 0.9rem;
     104  background: var(--paper-2); border: 1px solid var(--rule);
     105  border-left: 3px solid var(--rule); border-radius: 10px;
     106}
     107.decision-card--approved { border-left-color: #2a9d5e; }
     108.decision-card--rejected { border-left-color: #c33; }
     109.decision-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
     110.decision-author { font-weight: 600; }
     111.decision-post { color: var(--accent); text-decoration: none; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
     112.decision-post:hover { text-decoration: underline; }
     113.decision-date { flex: 0 0 auto; color: var(--ink-muted, var(--ink-soft)); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
     114@media (max-width: 520px) {
     115  .decision-card { flex-wrap: wrap; }
     116  .decision-date { width: 100%; }
     117}
     118
    104119.audio-flash { padding: 0.75rem 1rem; border-radius: 6px; margin: 1rem 0; font-size: 0.9rem; }
    105120.audio-flash--ok { background: rgba(40, 160, 90, 0.15); color: #2a9d5e; border: 1px solid rgba(40, 160, 90, 0.3); }
Note: See TracChangeset for help on using the changeset viewer.