Changeset cf4cf27 in Klonkt


Ignore:
Timestamp:
06/26/2026 05:10:47 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
eacd3d6
Parents:
eefd302
Message:

feat(circle): show only the post title in the feed + 2x larger source link

Circle feed used the whole post text as the title (run-on). Now extract just the
title (the note's bold first line); title-less notes fall back to a snippet. And the
'van <site>' source link (with ⛓ icon) is 2x larger (.72rem -> 1.44rem). style.css?v=55.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    reefd302 rcf4cf27  
    23982398.grid-tile-overlay-src {
    23992399    color: #fff; opacity: .85;
    2400     font-size: .72rem; margin-top: .2rem;
     2400    font-size: 1.44rem; margin-top: .2rem;
    24012401    display: inline-flex; align-items: center;
    24022402}
    24032403.grid-tile-overlay-src::before { content: "⛓"; margin-right: .25rem; font-size: .9em; }
    24042404.grid-tile-gradient-src {
    2405     margin-top: .35rem; font-size: .72rem; opacity: .85;
     2405    margin-top: .35rem; font-size: 1.44rem; opacity: .85;
    24062406    color: var(--ink-soft);
    24072407    display: inline-flex; align-items: center;
  • src/routes/circle.js

    reefd302 rcf4cf27  
    3333  const posts = ActivityPubService.getCirkelPosts(site.slug, 80).map((r) => {
    3434    const text = htmlToText(r.content);
     35    // Show ONLY the title (the bold first line a Klonkt note carries), not the whole
     36    // body. Title-less notes (e.g. plain Mastodon) fall back to a short text snippet.
     37    const titleM = (r.content || '').match(/^\s*<p>\s*<strong>([\s\S]*?)<\/strong>/i);
     38    const realTitle = titleM ? htmlToText(titleM[1]).trim() : '';
    3539    const image = mediaImage(r.media_json);
    3640    const name = r.author_name || r.author_handle || 'Onbekend';
     
    3842      id: 'ap-' + r.id,
    3943      slug: '',
    40       title: text ? (text.length > 90 ? text.slice(0, 90) + '…' : text) : name,
     44      title: realTitle
     45        ? (realTitle.length > 90 ? realTitle.slice(0, 90) + '…' : realTitle)
     46        : (text ? (text.length > 90 ? text.slice(0, 90) + '…' : text) : name),
    4147      excerpt: '',
    4248      cover_image_url: image ? image.url : null,
  • src/views/shell.ejs

    reefd302 rcf4cf27  
    198198
    199199<!-- v9 stylesheet (full palette system) -->
    200 <link rel="stylesheet" href="/assets/css/style.css?v=54">
     200<link rel="stylesheet" href="/assets/css/style.css?v=55">
    201201<script>
    202202/* iOS safe-area, built by hand. env(safe-area-inset-top) resolves to 0 on this iOS in
Note: See TracChangeset for help on using the changeset viewer.