--- import Base from '../layouts/Base.astro'; import { fetchAllFragments, blobUrl, DID } from '../lib/atproto'; const fragments = await fetchAllFragments(); const sorted = [...fragments].reverse(); const hero = sorted.find(f => f.type === 'shot' && f.images?.length); const grid = sorted.filter(f => f !== hero); function typeAccent(type: string): string { return type === 'list' ? '#7b8adf' : type === 'shot' ? 'var(--accent-2)' : 'var(--accent)'; } function excerpt(text: string): string { return text.replace(/[#*_\[\]()>`-]/g, '').trim().slice(0, 100); } ---

nate.rip

{sorted.length} fragments / {sorted.filter(f => f.type === 'post').length}p / {sorted.filter(f => f.type === 'shot').length}s / {sorted.filter(f => f.type === 'list').length}l
{hero && hero.images && ( {hero.title}
shot #{hero.id}

{hero.title}

)}
fragments
{grid.map((f, i) => { const isShot = f.type === 'shot' && f.images?.length; const isInlineHero = isShot && i > 0 && i % 10 === 0; if (isInlineHero) { return ( {f.title}
shot #{f.id}

{f.title}

); } if (isShot) { const isWide = i % 7 === 0; const isTall = !isWide && i % 5 === 2; return ( {f.title}
#{f.id} {f.title}
); } return ( {f.id} {f.type}

{f.title}

{f.content && (

{excerpt(f.content)}

)}
); })}
log