Changeset 3a2c9d3 in Klonkt
- Timestamp:
- 06/24/2026 12:16:43 PM (3 months ago)
- Branches:
- main
- Children:
- 52ea6df
- Parents:
- 55bc7f9
- Location:
- src
- Files:
-
- 4 edited
-
assets/css/style.css (modified) (1 diff)
-
services/i18n.js (modified) (3 diffs)
-
views/pages/post.ejs (modified) (2 diffs)
-
views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/style.css
r55bc7f9 r3a2c9d3 4401 4401 } 4402 4402 4403 /* === Fediverse interactions (inbound AP replies/likes/boosts) === */ 4404 .post-fediverse { margin: 2.5rem 0; } 4405 .post-fediverse .fedi-heading { font-size: 1.2rem; margin: 0 0 .85rem; } 4406 .post-fediverse .fedi-stats { display: flex; gap: .55rem; margin: 0 0 1.25rem; } 4403 /* === Fediverse interactions — inherits the native .comment styling === */ 4404 .post-fediverse .fedi-stats { display: flex; gap: .55rem; margin: .25rem 0 1.25rem; } 4407 4405 .post-fediverse .fedi-stats span { 4408 4406 display: inline-flex; align-items: center; gap: .35rem; 4409 padding: .2 5rem .7rem; border-radius: 999px; font-size: .85rem;4407 padding: .2rem .65rem; border-radius: 999px; font-size: .82rem; 4410 4408 color: var(--ink-soft, #888); 4411 background: color-mix(in srgb, currentColor 10%, transparent); 4412 } 4413 .post-fediverse .fedi-replies { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; } 4414 .post-fediverse .fedi-reply { 4415 display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 16px; 4416 background: color-mix(in srgb, var(--ink, #000) 4%, transparent); 4417 border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); 4418 } 4419 .post-fediverse .fedi-avatar { 4420 flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; 4421 display: flex; align-items: center; justify-content: center; 4422 background: color-mix(in srgb, var(--accent, #888) 22%, transparent); 4423 } 4424 .post-fediverse .fedi-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; } 4425 .post-fediverse .fedi-avatar-fallback { font-weight: 700; font-size: 1.05rem; color: var(--accent, #555); } 4426 .post-fediverse .fedi-main { flex: 1; min-width: 0; } 4427 .post-fediverse .fedi-line { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; } 4428 .post-fediverse .fedi-name { font-weight: 600; color: var(--ink, inherit); text-decoration: none; } 4429 .post-fediverse .fedi-name:hover { text-decoration: underline; } 4430 .post-fediverse .fedi-handle { color: var(--ink-soft, #888); font-size: .85rem; } 4431 .post-fediverse .fedi-time { color: var(--ink-soft, #999); font-size: .8rem; margin-left: auto; } 4432 .post-fediverse .fedi-text { margin: .3rem 0 0; line-height: 1.5; overflow-wrap: anywhere; } 4433 .post-fediverse .fedi-text p { margin: .25rem 0; } 4434 .post-fediverse .fedi-text p:first-child { margin-top: 0; } 4435 .post-fediverse .fedi-text a { color: var(--accent, #06c); } 4436 .post-fediverse .fedi-ours { 4437 margin: .6rem 0 0; padding: .55rem .75rem; border-radius: 12px; 4438 border-left: 3px solid var(--accent, #888); 4439 background: color-mix(in srgb, var(--accent, #888) 8%, transparent); 4440 font-size: .95rem; 4441 } 4442 .post-fediverse .fedi-ours-label { font-weight: 600; color: var(--accent, #555); margin-right: .25rem; } 4443 .post-fediverse .fedi-ours-body p { margin: 0; display: inline; } 4444 .post-fediverse .fedi-replybox { margin-top: .55rem; } 4445 .post-fediverse .fedi-replybox summary { cursor: pointer; font-size: .85rem; color: var(--ink-soft, #888); width: fit-content; } 4446 .post-fediverse .fedi-replybox form { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; } 4447 .post-fediverse .fedi-replybox textarea { 4448 width: 100%; box-sizing: border-box; resize: vertical; padding: .55rem .7rem; 4449 border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent); 4450 background: var(--paper, #fff); color: var(--ink, #000); font: inherit; 4451 } 4452 .post-fediverse .fedi-replybox button { align-self: flex-end; } 4409 background: color-mix(in srgb, currentColor 12%, transparent); 4410 } 4411 .post-fediverse .fedi-handle { color: var(--ink-soft, #888); font-size: .82rem; } 4412 .post-fediverse .comment-content p { margin: .2rem 0; } 4413 .post-fediverse .comment-content p:first-child { margin-top: 0; } 4414 .post-fediverse .comment-content p:last-child { margin-bottom: 0; } 4415 /* reply toggle: a plain "Reageer" action like the comment buttons (no triangle) */ 4416 .post-fediverse .fedi-reply-toggle { list-style: none; cursor: pointer; display: inline-block; } 4417 .post-fediverse .fedi-reply-toggle::-webkit-details-marker { display: none; } 4418 .post-fediverse details[open] .fedi-reply-toggle { margin-bottom: .5rem; } -
src/services/i18n.js
r55bc7f9 r3a2c9d3 108 108 'comments.empty': 'Nog geen reacties.', 109 109 'fedi.heading': 'Vanuit de fediverse', 'fedi.likes': 'sterren', 'fedi.boosts': 'boosts', 'fedi.replies': 'Reacties uit de fediverse', 110 'fedi.reply': 'Reageer', 'fedi.reply_ph': 'Je antwoord aan de fediverse…', 'fedi.send': 'Versturen', 'fedi.you': 'Jij :',110 'fedi.reply': 'Reageer', 'fedi.reply_ph': 'Je antwoord aan de fediverse…', 'fedi.send': 'Versturen', 'fedi.you': 'Jij', 111 111 'comments.to_start': 'om de conversatie te starten.', 112 112 'comments.reply': 'Reageer', 'comments.delete': 'Verwijder', 'comments.cancel': 'Annuleren', … … 1102 1102 'comments.empty': 'No comments yet.', 1103 1103 'fedi.heading': 'From the fediverse', 'fedi.likes': 'favourites', 'fedi.boosts': 'boosts', 'fedi.replies': 'Replies from the fediverse', 1104 'fedi.reply': 'Reply', 'fedi.reply_ph': 'Your reply to the fediverse…', 'fedi.send': 'Send', 'fedi.you': 'You :',1104 'fedi.reply': 'Reply', 'fedi.reply_ph': 'Your reply to the fediverse…', 'fedi.send': 'Send', 'fedi.you': 'You', 1105 1105 'comments.to_start': 'to start the conversation.', 1106 1106 'comments.reply': 'Reply', 'comments.delete': 'Delete', 'comments.cancel': 'Cancel', … … 2094 2094 'comments.empty': 'Noch keine Kommentare.', 2095 2095 'fedi.heading': 'Aus dem Fediverse', 'fedi.likes': 'Favoriten', 'fedi.boosts': 'Boosts', 'fedi.replies': 'Antworten aus dem Fediverse', 2096 'fedi.reply': 'Antworten', 'fedi.reply_ph': 'Deine Antwort an das Fediverse…', 'fedi.send': 'Senden', 'fedi.you': 'Du :',2096 'fedi.reply': 'Antworten', 'fedi.reply_ph': 'Deine Antwort an das Fediverse…', 'fedi.send': 'Senden', 'fedi.you': 'Du', 2097 2097 'comments.to_start': 'um das Gespräch zu starten.', 2098 2098 'comments.reply': 'Antworten', 'comments.delete': 'Löschen', 'comments.cancel': 'Abbrechen', -
src/views/pages/post.ejs
r55bc7f9 r3a2c9d3 73 73 74 74 <!-- Fediverse interactions (inbound replies / likes / boosts via ActivityPub) --> 75 <!-- Mirrors the native comment markup/classes so it looks identical. --> 75 76 <% if (typeof fediverse !== 'undefined' && fediverse && fediverse.total > 0) { %> 76 <section class="post-fediverse " id="fediverse">77 <h2 class=" fedi-heading"><%= t('fedi.heading') %></h2>77 <section class="post-fediverse post-comments" id="fediverse"> 78 <h2 class="comments-heading"><%= t('fedi.heading') %></h2> 78 79 <p class="fedi-stats"> 79 80 <span title="<%= t('fedi.likes') %>">⭐ <%= fediverse.likeCount %></span> … … 82 83 </p> 83 84 <% if (fediverse.replies.length) { %> 84 < ul class="fedi-replies">85 <ol class="comments-list"> 85 86 <% fediverse.replies.forEach(function(r) { %> 86 <li class=" fedi-reply">87 <div class=" fedi-avatar">87 <li class="comment"> 88 <div class="comment-avatar"> 88 89 <% if (r.actor_icon) { %><img src="<%= r.actor_icon %>" alt="" loading="lazy"> 89 <% } else { %><span class="fedi-avatar-fallback"><%= (r.actor_name || '?').charAt(0).toUpperCase() %></span><% } %>90 <% } else { %><span><%= (r.actor_name || '?').charAt(0).toUpperCase() %></span><% } %> 90 91 </div> 91 <div class=" fedi-main">92 <div class=" fedi-line">93 <a class=" fedi-name" href="<%= r.actor_url %>" rel="nofollow noopener" target="_blank"><%= r.actor_name %></a>92 <div class="comment-body"> 93 <div class="comment-meta"> 94 <a class="comment-author" href="<%= r.actor_url %>" rel="nofollow noopener" target="_blank"><%= r.actor_name %></a> 94 95 <span class="fedi-handle"><%= r.actor_handle %></span> 95 <% if (r.published || r.created_at) { %>< time class="fedi-time"><%= formatDateTime(r.published || r.created_at) %></time><% } %>96 <% if (r.published || r.created_at) { %><span class="comment-time"><%= formatDateTime(r.published || r.created_at) %></span><% } %> 96 97 </div> 97 <div class="fedi-text"><%- r.content %></div> 98 <% var mine = (typeof fediverse.outReplies !== 'undefined' ? fediverse.outReplies : []).filter(function(o){ return o.in_reply_to && o.in_reply_to === r.object_uri; }); %> 99 <% mine.forEach(function(o){ %> 100 <div class="fedi-ours"><span class="fedi-ours-label"><%= t('fedi.you') %></span> <span class="fedi-ours-body"><%- o.content %></span></div> 101 <% }); %> 98 <div class="comment-content"><%- r.content %></div> 99 102 100 <% if (typeof canManageSite !== 'undefined' && canManageSite) { %> 103 101 <details class="fedi-replybox"> 104 <summary ><%= t('fedi.reply') %></summary>105 <form method="post" action="<%= _base %>/posts/<%= post.slug %>/fedi-reply" >102 <summary class="comment-reply-btn fedi-reply-toggle"><%= t('fedi.reply') %></summary> 103 <form method="post" action="<%= _base %>/posts/<%= post.slug %>/fedi-reply" class="comment-reply-form"> 106 104 <input type="hidden" name="interaction_id" value="<%= r.id %>"> 107 <textarea name="text" rows="2" required placeholder="<%= t('fedi.reply_ph') %>"></textarea> 108 <button type="submit" class="btn btn-primary"><%= t('fedi.send') %></button> 105 <textarea name="text" rows="3" required placeholder="<%= t('fedi.reply_ph') %>"></textarea> 106 <div class="comment-reply-form-actions"> 107 <button type="submit" class="btn btn-primary"><%= t('fedi.send') %></button> 108 </div> 109 109 </form> 110 110 </details> 111 <% } %> 112 113 <% var mine = (typeof fediverse.outReplies !== 'undefined' ? fediverse.outReplies : []).filter(function(o){ return o.in_reply_to && o.in_reply_to === r.object_uri; }); %> 114 <% if (mine.length) { %> 115 <ol class="comment-replies"> 116 <% mine.forEach(function(o){ %> 117 <li class="comment comment-reply"> 118 <div class="comment-avatar"><span><%= t('fedi.you').charAt(0).toUpperCase() %></span></div> 119 <div class="comment-body"> 120 <div class="comment-meta"><span class="comment-author"><%= t('fedi.you') %></span></div> 121 <div class="comment-content"><%- o.content %></div> 122 </div> 123 </li> 124 <% }); %> 125 </ol> 111 126 <% } %> 112 127 </div> 113 128 </li> 114 129 <% }); %> 115 </ ul>130 </ol> 116 131 <% } %> 117 132 </section> -
src/views/shell.ejs
r55bc7f9 r3a2c9d3 175 175 176 176 <!-- v9 stylesheet (full palette system) --> 177 <link rel="stylesheet" href="/assets/css/style.css?v=3 7">177 <link rel="stylesheet" href="/assets/css/style.css?v=38"> 178 178 179 179 <!-- Audio player styles: loaded on every page so the mini-player works
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)