Changeset c7c7f02 in Klonkt
- Timestamp:
- 06/26/2026 01:01:54 PM (2 months ago)
- Branches:
- main
- Children:
- b6cdc3d
- Parents:
- bbce8da
- Location:
- src
- Files:
-
- 4 edited
-
routes/circle.js (modified) (1 diff)
-
services/ActivityPubService.js (modified) (1 diff)
-
views/partials/post-card.ejs (modified) (3 diffs)
-
views/partials/post-tile.ejs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/circle.js
rbbce8da rc7c7f02 46 46 tags: '', 47 47 pinned: 0, 48 isBoost: !!r.boosted, // a post YOU boosted → render in the pinned style with a Boost badge 48 49 status: 'published', 49 50 source_name: name, -
src/services/ActivityPubService.js
rbbce8da rc7c7f02 1063 1063 if (!_cirkelPosts) _cirkelPosts = db.prepare(` 1064 1064 SELECT t.id, t.author_uri, t.author_name, t.author_handle, t.author_icon, t.author_url, 1065 t.content, t.url, t.published, t.media_json 1065 t.content, t.url, t.published, t.media_json, t.boosted 1066 1066 FROM ap_timeline t 1067 1067 LEFT JOIN ap_following f ON f.slug = t.slug AND f.actor_uri = t.author_uri -
src/views/partials/post-card.ejs
rbbce8da rc7c7f02 19 19 const _typeLabel = (post.type && post.type !== 'overig' && post.type !== 'post') ? post.type : ''; 20 20 const _isPinned = !!post.pinned; 21 const _isBoost = !!post.isBoost; 21 22 const _isDraft = post.status && post.status !== 'published'; 22 23 … … 42 43 } 43 44 %> 44 <li class="post-list-item<%= _hasCover ? ' has-cover' : '' %><%= _isPinned? ' is-pinned' : '' %>">45 <li class="post-list-item<%= _hasCover ? ' has-cover' : '' %><%= (_isPinned || _isBoost) ? ' is-pinned' : '' %>"> 45 46 46 47 <% if (_hasCover) { %> … … 54 55 <div class="post-list-body"> 55 56 <div class="post-list-meta mono"> 56 <% if (_is Pinned) { %><span class="post-list-pin" aria-label="Vastgepind">★</span><% } %>57 <% if (_isBoost) { %><span class="post-list-pin post-list-boost" aria-label="Boost">🔁</span><% } else if (_isPinned) { %><span class="post-list-pin" aria-label="Vastgepind">★</span><% } %> 57 58 <time datetime="<%= post.published_at || post.created_at %>"><%= _ddmmyyyy(post.published_at || post.created_at) %></time> 58 59 <% if (_src) { %><span class="post-list-type">· via <%= _src %></span><% } %> -
src/views/partials/post-tile.ejs
rbbce8da rc7c7f02 5 5 const _tileHue = ((post.id || post.slug || '0').charCodeAt(0) * 7) % 360; 6 6 const _isPinned = !!post.pinned; 7 const _isBoost = !!post.isBoost; 7 8 const _hasCover = !!post.cover_image_url; 8 9 const _typeLabel = (post.type && post.type !== 'post') ? post.type : ''; … … 13 14 const _ext = !!_external; 14 15 %> 15 <a class="grid-tile<%= _hasCover ? '' : ' grid-tile-gradient' %><%= _isPinned? ' is-pinned' : '' %>"16 <a class="grid-tile<%= _hasCover ? '' : ' grid-tile-gradient' %><%= (_isPinned || _isBoost) ? ' is-pinned' : '' %>" 16 17 href="<%= _href %>" 17 18 <% if (_hasCover) { %>style="background-image: url('<%= post.cover_image_url %>'); --tile-hue: <%= _tileHue %>;"<% } else { %>style="--tile-hue: <%= _tileHue %>;"<% } %> … … 21 22 <span class="grid-tile-type"><%= _typeLabel %></span> 22 23 <% } %> 23 <% if (_isPinned) { %> 24 <% if (_isBoost) { %> 25 <span class="grid-tile-pin grid-tile-boost"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m17 2 4 4-4 4"/><path d="M3 11v-1a4 4 0 0 1 4-4h14"/><path d="m7 22-4-4 4-4"/><path d="M21 13v1a4 4 0 0 1-4 4H3"/></svg>Boost</span> 26 <% } else if (_isPinned) { %> 24 27 <span class="grid-tile-pin"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>Pinned</span> 25 28 <% } %>
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)