Changeset 520e477 in Klonkt for src/views/pages/circle-feed.ejs


Ignore:
Timestamp:
07/20/2026 07:35:55 AM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
22d2f5a8
Parents:
1485933
git-author:
Robin <roboburr@…> (07/20/2026 07:26:51 AM)
git-committer:
Robin <roboburr@…> (07/20/2026 07:35:55 AM)
Message:

Feature: Load more on Solo + Cirkel, page 72 (klonkt-demo-r9u, slice 3/4)

The home feed (Solo) and the Cirkel feed now page in 72s instead of a
hard 30/80 cap. Both render two containers (list + grid, CSS-toggled),
so the append fragment (partials/home-append) sends the post-cards as
the primary beforeend swap into #post-list and OOB-appends the same
posts as tiles into #grid-tiles. htmx 1.9.12 unwraps the OOB wrapper's
children on a positional swap, so the tiles land as direct grid items
(the display:contents wrapper is a belt-and-braces fallback). The
button lives once below both views and OOB-replaces itself with the
next offset, dropping on the last page. Pinned posts stay on page 1
only. getCirkelPosts gains an offset arg; FEED_PAGE hoisted to the top
of posts.js.

Browser-verified both feeds: 72 -> 144 -> 150 in list AND grid, then
the button disappears.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/circle-feed.ejs

    r1485933 r520e477  
    6767  <!-- ===== TIMELINE (standaard) ===== -->
    6868  <div class="container feed-timeline">
    69     <ul class="post-list feed-timeline-list">
     69    <ul class="post-list feed-timeline-list" id="post-list">
    7070      <% posts.forEach(function(post){ %>
    7171        <%- include('../partials/post-card', { post: post }) %>
     
    7676  <!-- ===== GRID (body[data-feed-view="grid"]) ===== -->
    7777  <section class="feed-grid container" aria-label="<%= t('cfeed.grid_view') %>">
    78     <div class="grid-tiles">
     78    <div class="grid-tiles" id="grid-tiles">
    7979      <% posts.forEach(function(post){ %>
    8080        <%- include('../partials/post-tile', { post: post }) %>
     
    8282    </div>
    8383  </section>
     84
     85  <% if (typeof hasMore !== 'undefined') { %>
     86  <div class="container feed-more-wrap">
     87    <%- include('../partials/load-more', { hasMore: hasMore, nextOffset: nextOffset, moreBase: moreBase, moreTarget: '#post-list', morePath: '/cirkel' }) %>
     88  </div>
     89  <% } %>
    8490
    8591<% } %>
Note: See TracChangeset for help on using the changeset viewer.