---
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);
}
---
{excerpt(f.content)}
)} ); })}