Changeset aadb11e in Klonkt for src/views/pages/post.ejs
- Timestamp:
- 06/24/2026 05:31:51 PM (3 months ago)
- Branches:
- main
- Children:
- b2c3699
- Parents:
- 48ca5fc
- File:
-
- 1 edited
-
src/views/pages/post.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/post.ejs
r48ca5fc raadb11e 31 31 <% } %> 32 32 </div> 33 <% if (post.status === 'published') { %>34 <div class="post-like-row">35 <%- include('../partials/like-button', { post: post, noteUri: (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug, fediLikeCount: (typeof fediverse !== 'undefined' && fediverse ? fediverse.likeCount : 0), fediPh: t('fedi.remote_ph') }) %>36 </div>37 <% } %>38 33 </header> 39 34 … … 72 67 <% } %> 73 68 74 <!-- Fediverse interactions (threaded: inbound replies/likes/boosts + our replies) --> 75 <% if (typeof fediverse !== 'undefined' && fediverse && fediverse.total > 0) { %> 69 <!-- Fediverse interactions — single place: ⭐ like (clickable) + 🔁/💬 counts + reply --> 70 <% var _postAbsUrl = (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug; %> 71 <% var _fedi = (typeof fediverse !== 'undefined' && fediverse) ? fediverse : { thread: [], likeCount: 0, announceCount: 0 }; %> 72 <% if (post.status === 'published') { %> 76 73 <section class="post-fediverse post-comments" id="fediverse"> 77 74 <h2 class="comments-heading"><%= t('fedi.heading') %></h2> 78 75 <p class="fedi-stats"> 79 < span title="<%= t('fedi.likes') %>">⭐ <%= fediverse.likeCount %></span>80 <span title="<%= t('fedi.boosts') %>">🔁 <%= fediverse.announceCount %></span>81 <span title="<%= t('fedi.replies') %>">💬 <%= ( fediverse.thread || []).length %></span>76 <button type="button" class="fedi-stat-btn fedi-remote-reply-btn" data-fedi-uri="<%= _postAbsUrl %>" data-fedi-ph="<%= t('fedi.remote_ph') %>" title="<%= t('like.fedi_title') %>">⭐ <%= _fedi.likeCount %></button> 77 <span title="<%= t('fedi.boosts') %>">🔁 <%= _fedi.announceCount %></span> 78 <span title="<%= t('fedi.replies') %>">💬 <%= (_fedi.thread || []).length %></span> 82 79 </p> 83 <% if ( fediverse.thread && fediverse.thread.length) { %>80 <% if (_fedi.thread && _fedi.thread.length) { %> 84 81 <ol class="comments-list"> 85 <% fediverse.thread.forEach(function(n){ %>82 <% _fedi.thread.forEach(function(n){ %> 86 83 <li class="comment"><%- include('../partials/fedi-node', { n: n, t: t, canManageSite: (typeof canManageSite !== 'undefined' ? canManageSite : false), _base: _base, siteAvatar: (typeof siteAvatar !== 'undefined' ? siteAvatar : null), formatDateTime: formatDateTime }) %></li> 87 84 <% }); %> 88 85 </ol> 89 86 <% } %> 87 <div class="post-fediverse-cta"> 88 <button type="button" class="btn fedi-remote-reply-btn" data-fedi-uri="<%= _postAbsUrl %>" data-fedi-ph="<%= t('fedi.remote_ph') %>"> 89 <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg> 90 <%= t('fedi.remote_reply') %> 91 </button> 92 </div> 90 93 </section> 91 94 <% } %> 92 93 <!-- Reply via the fediverse (remote interaction: bounces to the visitor's own server) -->94 <% var _postAbsUrl = (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug; %>95 <div class="post-fediverse-cta">96 <button type="button" class="btn fedi-remote-reply-btn" data-fedi-uri="<%= _postAbsUrl %>" data-fedi-ph="<%= t('fedi.remote_ph') %>">97 <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg>98 <%= t('fedi.remote_reply') %>99 </button>100 </div>101 95 <script> 102 96 (function(){
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)