Changeset 6117035 in Klonkt for src/views/pages/post.ejs
- Timestamp:
- 06/15/2026 04:02:17 AM (3 months ago)
- Branches:
- main
- Children:
- 11a6871
- Parents:
- 33886fb
- File:
-
- 1 edited
-
src/views/pages/post.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/post.ejs
r33886fb r6117035 233 233 <% } %> 234 234 235 <%# ── Pinned navigation (only when current post is pinned) ─── 236 Two card-style links: "Vorige vastgepinde" / "Volgende vastgepinde". 237 Edge-of-stack states show "← BOVENAAN — Nieuwste post" or the equivalent 238 for the bottom. Layout mirrors v9 exactly. %> 239 <% if (post.pinned) { %> 240 <nav class="post-pinned-nav" aria-label="Pinned navigation"> 241 <%# LEFT card: post one step UP the pinned stack (towards #1). 242 Uses prevPinnedPost which now means "smaller rank". %> 243 <% if (prevPinnedPost) { %> 244 <a class="post-pinned-card post-pinned-card--prev" href="<%= _base %>/<%= prevPinnedPost.slug %>" 245 hx-get="<%= _base %>/<%= prevPinnedPost.slug %>?partial=1" hx-target="#pcms-main" 246 hx-push-url="<%= _base %>/<%= prevPinnedPost.slug %>" hx-indicator="#pcms-loading"> 247 <span class="post-pinned-arrow" aria-hidden="true">←</span> 248 <span class="post-pinned-body"> 249 <span class="post-pinned-label">📌 Vorige vastgepinde</span> 250 <span class="post-pinned-title"><%= prevPinnedPost.title %></span> 251 <span class="post-pinned-cta">Lees deze post →</span> 252 </span> 253 </a> 254 <% } else if (pinnedTopOfStack) { %> 255 <span class="post-pinned-card post-pinned-card--edge"> 256 <span class="post-pinned-edge-label">— BOVENAAN —</span> 257 <span class="post-pinned-edge-title">Nieuwste post</span> 258 </span> 259 <% } %> 260 261 <%# RIGHT card: post one step DOWN the pinned stack (away from #1). 262 Uses nextPinnedPost which now means "larger rank". %> 263 <% if (nextPinnedPost) { %> 264 <a class="post-pinned-card post-pinned-card--next" href="<%= _base %>/<%= nextPinnedPost.slug %>" 265 hx-get="<%= _base %>/<%= nextPinnedPost.slug %>?partial=1" hx-target="#pcms-main" 266 hx-push-url="<%= _base %>/<%= nextPinnedPost.slug %>" hx-indicator="#pcms-loading"> 267 <span class="post-pinned-arrow" aria-hidden="true">→</span> 268 <span class="post-pinned-body"> 269 <span class="post-pinned-label">📌 Volgende vastgepinde</span> 270 <span class="post-pinned-title"><%= nextPinnedPost.title %></span> 271 <span class="post-pinned-cta">← Lees deze post</span> 272 </span> 273 </a> 274 <% } else if (pinnedBottomOfStack) { %> 275 <span class="post-pinned-card post-pinned-card--edge"> 276 <span class="post-pinned-edge-label">— ONDERAAN —</span> 277 <span class="post-pinned-edge-title">Oudste post</span> 278 </span> 279 <% } %> 280 </nav> 281 <% } %> 282 283 <%# ── Chronological prev/next (kept for non-pinned posts) ────── 284 For pinned posts the pinned-nav above replaces this. Non-pinned 285 regular posts still get the simple older/newer pair. %> 286 <% if (!post.pinned && (prevPost || nextPost)) { %> 235 <%# ── Navigatie over ALLE posts (pinned + niet-pinned in de feed-volgorde) ── 236 Newer links (← omhoog in de lijst), Older rechts (→ omlaag). Vervangt de 237 vroegere pinned-only stack-navigatie: pinned posts zitten gewoon in de 238 doorlopende reeks. .post-nav-prev = linker kolom, .post-nav-next = rechter. %> 239 <% if (newerPost || olderPost) { %> 287 240 <nav class="post-nav"> 288 <%# Newer links, Older rechts (lijst nieuwste-eerst → naar rechts = ouder). 289 .post-nav-prev = linker kolom (links uitgelijnd), .post-nav-next = 290 rechter kolom (rechts uitgelijnd). %> 291 <% if (nextPost) { %> 292 <a class="post-nav-prev" href="<%= nextPost._urlBase || '' %>/<%= nextPost.slug %>"<% if (!nextPost._urlBase) { %> 293 hx-get="/<%= nextPost.slug %>?partial=1" hx-target="#pcms-main" 294 hx-push-url="/<%= nextPost.slug %>" hx-indicator="#pcms-loading"<% } %>> 241 <% if (newerPost) { %> 242 <a class="post-nav-prev" href="<%= newerPost._urlBase || '' %>/<%= newerPost.slug %>"<% if (!newerPost._urlBase) { %> 243 hx-get="/<%= newerPost.slug %>?partial=1" hx-target="#pcms-main" 244 hx-push-url="/<%= newerPost.slug %>" hx-indicator="#pcms-loading"<% } %>> 295 245 <span class="post-nav-label">← Newer</span> 296 <span class="post-nav-title"><%= ne xtPost.title %></span>246 <span class="post-nav-title"><%= newerPost.title %></span> 297 247 </a> 298 248 <% } else { %><span></span><% } %> 299 <% if ( prevPost) { %>300 <a class="post-nav-next" href="<%= prevPost._urlBase || '' %>/<%= prevPost.slug %>"<% if (!prevPost._urlBase) { %>301 hx-get="/<%= prevPost.slug %>?partial=1" hx-target="#pcms-main"302 hx-push-url="/<%= prevPost.slug %>" hx-indicator="#pcms-loading"<% } %>>249 <% if (olderPost) { %> 250 <a class="post-nav-next" href="<%= olderPost._urlBase || '' %>/<%= olderPost.slug %>"<% if (!olderPost._urlBase) { %> 251 hx-get="/<%= olderPost.slug %>?partial=1" hx-target="#pcms-main" 252 hx-push-url="/<%= olderPost.slug %>" hx-indicator="#pcms-loading"<% } %>> 303 253 <span class="post-nav-label">Older →</span> 304 <span class="post-nav-title"><%= prevPost.title %></span>254 <span class="post-nav-title"><%= olderPost.title %></span> 305 255 </a> 306 256 <% } %>
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)