--- import type { FeedPost } from '../lib/atproto/types'; interface Props { post: FeedPost; } const { post } = Astro.props; // Community post permalinks open in mu.social (same path shape as bsky.app). const muPost = (handle: string, uri: string) => `https://mu.social/profile/${handle}/post/${uri.split('/').pop()}`; const postUrl = muPost(post.author.handle, post.uri); // Dutch date format (DD-MM-YYYY) on both language sides — Netherlands community site. const date = new Date(post.createdAt).toLocaleDateString('nl-NL', { day: '2-digit', month: '2-digit', year: 'numeric', }); const ext = post.embed?.external; let extHost = ''; try { if (ext) extHost = new URL(ext.uri).hostname.replace(/^www\./, ''); } catch { extHost = ''; } const quote = post.embed?.quote; const quoteUrl = quote ? muPost(quote.handle, quote.uri) : undefined; ---
{ post.author.avatar && ( ) } {post.author.displayName ?? post.author.handle} @{post.author.handle}
{post.text &&

{post.text}

} { post.embed?.images?.length && (
{post.embed.images.map((im) => ( {im.alt} ))}
) } { ext && (ext.gif ? ( {ext.title} ) : ( {ext.thumb && } {ext.title || ext.uri} {ext.description && {ext.description}} {extHost && {extHost}} )) } { quote && ( {quote.avatar && } {quote.displayName ?? quote.handle} @{quote.handle} {quote.text && {quote.text}} {quote.images?.length && ( {quote.images.map((im) => ( {im.alt} ))} )} {quote.external?.gif ? ( {quote.external.title} ) : quote.external ? ( {quote.external.thumb && } {quote.external.title || quote.external.uri} ) : null} ) }
{post.replyCount} {post.quoteCount}