import { html } from "/js/lib/lit-html.js"; import { formatRelativeTime } from "/js/utils.js"; import { linkToProfile } from "/js/navigation.js"; import { profileBadgesTemplate } from "/js/templates/profileBadges.template.js"; import { getDisplayName } from "/js/dataHelpers.js"; export function postHeaderTextTemplate({ author, timestamp, includeTime = true, includeHandle = true, enableProfileLink = true, }) { return html`
${enableProfileLink ? html`${getDisplayName(author)}` : html`${getDisplayName(author)}`}${profileBadgesTemplate({ profile: author })} ${includeHandle ? enableProfileLink ? html`@${author.handle}` : html`@${author.handle}` : ""} ${includeTime ? html`ยท${formatRelativeTime(timestamp)}` : ""}
`; }