Changeset 8cdb377 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/19/2026 09:40:04 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
535f955
Parents:
1e2e9e7
Message:

ui(post-nav): show 📌 when the Newer/Older post is pinned

postNeighbors() now also selects pinned; the partial shows a 📌 next to
the label of a pinned neighbour (solo + hub).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r1e2e9e7 r8cdb377  
    401401  const ordered = isHub
    402402    ? db.prepare(`
    403         SELECT p.id, p.slug, p.title, s.slug AS site_slug
     403        SELECT p.id, p.slug, p.title, p.pinned, s.slug AS site_slug
    404404        FROM posts p JOIN sites s ON s.id = p.site_id
    405405        WHERE p.status = 'published'
     
    407407      `).all()
    408408    : db.prepare(`
    409         SELECT id, slug, title FROM posts
     409        SELECT id, slug, title, pinned FROM posts
    410410        WHERE site_id = ? AND status = 'published'
    411411        ORDER BY (pinned = 0) ASC, pinned ASC, published_at DESC
Note: See TracChangeset for help on using the changeset viewer.