Changeset e25438a in Klonkt


Ignore:
Timestamp:
06/21/2026 06:52:12 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
c1b757d
Parents:
9a34d31
Message:

fix(comments): reply form closed until REPLY click + DELETE pixel-perfectly aligned

(1) .comment-reply-form{display:flex} overrode the [hidden] attribute -> the
form was always open. Now .comment-reply-form[hidden]{display:none} so it only
opens after clicking REPLY (the toggle JS already set .hidden).
(2) DELETE was in a <form style=display:inline> -> slightly different alignment
from REPLY. Now .comment-actions form{display:contents} (+ inline style removed)
-> both are identical flex siblings with equal gap/baseline.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post.ejs

    r9a34d31 re25438a  
    116116                <% } %>
    117117                <% if (user && permissions.canDeleteComment(user, c, site)) { %>
    118                   <form method="post" action="<%= _base %>/comments/<%= c.id %>/delete" style="display:inline" onsubmit="return confirm('<%= t('comments.delete_confirm') %>')">
     118                  <form method="post" action="<%= _base %>/comments/<%= c.id %>/delete" onsubmit="return confirm('<%= t('comments.delete_confirm') %>')">
    119119                    <button type="submit" class="comment-delete-btn"><%= t('comments.delete') %></button>
    120120                  </form>
     
    158158                          <% } %>
    159159                          <% if (user && permissions.canDeleteComment(user, r, site)) { %>
    160                             <form method="post" action="<%= _base %>/comments/<%= r.id %>/delete" style="display:inline" onsubmit="return confirm('<%= t('comments.delete_confirm') %>')">
     160                            <form method="post" action="<%= _base %>/comments/<%= r.id %>/delete" onsubmit="return confirm('<%= t('comments.delete_confirm') %>')">
    161161                              <button type="submit" class="comment-delete-btn"><%= t('comments.delete') %></button>
    162162                            </form>
     
    431431.comment-form button { align-self: flex-start; }
    432432.comment-reply-form-actions { display: flex; gap: 0.5rem; }
     433/* Reply-formulier pas tonen NA klik op REPLY. De display:flex hierboven overschreef
     434   anders het [hidden]-attribuut → formulier stond altijd open. */
     435.comment-reply-form[hidden] { display: none; }
     436/* DELETE-knop zit in een <form>; display:contents laat 'm als directe flex-sibling
     437   van REPLY meedoen → pixel-perfecte uitlijning + gelijke gap. */
     438.comment-actions form { display: contents; }
    433439
    434440.comments-login-cta { margin-top: 1.5rem; text-align: center; }
Note: See TracChangeset for help on using the changeset viewer.