--- import Avatar, { type AvatarSource } from "../Avatar.astro"; import SafeExternalLink from "../SafeExternalLink.astro"; import { hueFromString } from "../../lib/avatar-fallback"; interface Props { title: string; url: string; excerpt?: string; publishedAt?: Date; sharedAt: Date; author: { did: string; handle: string; displayName?: string; avatar: AvatarSource; }; sharedBy?: { did: string; handle: string; displayName?: string; avatar: AvatarSource; }; source: string; documentUri?: string; shareRecordUri?: string; shareRecordRkey?: string; tags?: string[]; } const { title, url, excerpt, publishedAt, sharedAt, author, sharedBy, source, tags } = Astro.props; const hasActions = Astro.slots.has("actions"); const date = publishedAt ?? sharedAt; const authorLabel = author.displayName || `@${author.handle}`; const sharedByLabel = sharedBy ? sharedBy.displayName || `@${sharedBy.handle}` : null; const shouldShowSharedBy = !!sharedBy && sharedBy.did !== author.did; const tag = tags?.[0]; const community = `@${source}`; const communityHue = hueFromString(source); ---

{title}

{excerpt &&

{excerpt}

}
{community} by {authorLabel} {shouldShowSharedBy && sharedByLabel && ( shared by {sharedByLabel} )} {tag && #{tag}}
{hasActions && (
)}